!2 package init

Merge pull request !2 from 杨晨光/master
This commit is contained in:
openeuler-ci-bot 2021-12-13 00:41:36 +00:00 committed by Gitee
commit a06ee9f3b0
2 changed files with 76 additions and 0 deletions

BIN
fastavro-1.4.5.tar.gz Normal file

Binary file not shown.

76
python-fastavro.spec Normal file
View File

@ -0,0 +1,76 @@
%global _empty_manifest_terminate_build 0
Name: python-fastavro
Version: 1.4.5
Release: 1
Summary: Fast read/write of AVRO files
License: MIT
URL: https://github.com/fastavro/fastavro
Source0: https://files.pythonhosted.org/packages/37/db/1cfae958348f817953660bec6c31b5ccb4dd6128c5c503a45011fc0917a7/fastavro-1.4.5.tar.gz
%description
Fast Avro for Python
%package -n python3-fastavro
Summary: Fast read/write of AVRO files
Provides: python-fastavro
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-cffi
BuildRequires: gcc
BuildRequires: gdb
%description -n python3-fastavro
The `fastavro` library was written to offer performance comparable to the Java
library. With regular CPython, `fastavro` uses C extensions which allow it to
iterate the same 10,000 record file in 1.7 seconds. With PyPy, this drops to 1.5
seconds (to be fair, the JAVA benchmark is doing some extra JSON
encoding/decoding).
%package help
Summary: Development documents and examples for fastavro
Provides: python3-fastavro-doc
%description help
Development documents and examples for fastavro
%prep
%autosetup -n fastavro-1.4.5
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-fastavro -f filelist.lst
%dir %{python3_sitearch}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Tue Oct 26 2021 yangchenguang <yangchenguang@uniontech.com> - 1.4.5-1
- Init Package