The package rpms/python-fastavro.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/python-fastavro.git/commit/?id=46....
Change:
+ExcludeArch: %{arm32} %{ix86}
Thanks.
Full change:
============
commit 2519236fbb47e57a0d0c4567176b44d221a3c052
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Oct 25 12:53:58 2021 -0400
Work around RHBZ#1905174 in F34 in python-check-manifest
diff --git a/python-fastavro.spec b/python-fastavro.spec
index 8afe7fc..4dd5c30 100644
--- a/python-fastavro.spec
+++ b/python-fastavro.spec
@@ -6,7 +6,7 @@
Name: python-fastavro
Version: 1.4.6
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Fast Avro for Python
# The fastavro project is licensed MIT, but is derived from Apache Avro which
@@ -95,6 +95,14 @@ Documentation for python-fastavro.
# Remove the already generated C files so we generate them ourselves
find fastavro/ -name '*.c' -print -delete
+%if 0%{?fc34}
+# The python-check-manifest package is broken (FTI) on F34
+#
https://bugzilla.redhat.com/show_bug.cgi?id=1905174
+sed -r -i 's/, "check-manifest"//' setup.py
+sed -r -i '/^check-manifest$/d' developer_requirements.txt
+%endif
+
+
%generate_buildrequires
# codecs includes snappy, zstandard, and lz4
@@ -174,6 +182,9 @@ k="${k-}${k+ and }not
test_regular_vs_ordered_dict_record_typeerror"
%changelog
+* Mon Oct 25 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.4.6-2
+- Work around RHBZ#1905174 in F34 in python-check-manifest
+
* Mon Oct 25 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.4.6-1
- Update to 1.4.6
commit fa00266bc6cd71b4c5c6fd90ce4deb0cc9876887
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Oct 25 11:57:09 2021 -0400
Add missing source archive for 1.4.6
diff --git a/.gitignore b/.gitignore
index 660db49..8b7e7b9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,4 @@
/fastavro-1.4.1.tar.gz
/fastavro-1.4.4.tar.gz
/fastavro-1.4.5.tar.gz
+/fastavro-1.4.6.tar.gz
diff --git a/sources b/sources
index 49a81f1..0d436c2 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (fastavro-1.4.5.tar.gz) =
22c31daa9dff10fb582c2fbff48a5c3205e9fd22e24783c1b4771f937aa21e3b3fa74c73be97199176ebc86088db717cb7233096c6d7f42a871fa038de542108
+SHA512 (fastavro-1.4.6.tar.gz) =
619723cb0c1501291da6151725874472ec02f5d44ae3e1e049e963e697d789ba8df26d68c7d7416c2a5da07143cca723ec844c61dd30aa86bbe0350a5bdb0991
commit bd2f915bb21ba75ff9b53e7f8a0655d984bd8cb0
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Oct 25 11:42:50 2021 -0400
Update to 1.4.6
diff --git a/python-fastavro.spec b/python-fastavro.spec
index b93f1f6..8afe7fc 100644
--- a/python-fastavro.spec
+++ b/python-fastavro.spec
@@ -5,7 +5,7 @@
%bcond_without doc_pdf
Name: python-fastavro
-Version: 1.4.5
+Version: 1.4.6
Release: 1%{?dist}
Summary: Fast Avro for Python
@@ -174,6 +174,9 @@ k="${k-}${k+ and }not
test_regular_vs_ordered_dict_record_typeerror"
%changelog
+* Mon Oct 25 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.4.6-1
+- Update to 1.4.6
+
* Mon Oct 11 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.4.5-1
- Update to 1.4.5 (close RHBZ#2007469)
- Switch to pyproject-rpm-macros (“new guidelines”)
commit 4627d04f05a5205e8a0e972a530c1e2e02da4195
Author: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Mon Oct 11 15:02:42 2021 -0400
Update to 1.4.5 (close RHBZ#2007469)
- Switch to pyproject-rpm-macros (“new guidelines”)
- Add extras metapackages
- Build PDF documentation instead of HTML due to JS bundling issues
- Change license from ASL 2.0 to (MIT and ASL 2.0)
diff --git a/.gitignore b/.gitignore
index 382efe7..660db49 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,4 @@
/fastavro-1.3.4.tar.gz
/fastavro-1.4.1.tar.gz
/fastavro-1.4.4.tar.gz
+/fastavro-1.4.5.tar.gz
diff --git a/python-fastavro.spec b/python-fastavro.spec
index f0444b1..b93f1f6 100644
--- a/python-fastavro.spec
+++ b/python-fastavro.spec
@@ -1,109 +1,186 @@
-%global srcname fastavro
-%global sum Fast Avro for Python
-%global _description %{expand: \
-Apache Avro is a data serialization system. The current Python avro package is
-packed with features but dog slow. fastavro is less feature complete than avro,
-however it is much faster.}
-
-Name: python-%{srcname}
-Version: 1.4.4
-Release: 1%{?dist}
-Summary: %{sum}
-
-#
https://github.com/tebeka/fastavro/issues/60
-# Apache avro is under ASL 2.0
-#
https://avro.apache.org/docs/1.8.2/api/cpp/html/ResolvingReader_8hh_sourc... etc
-License: ASL 2.0
-URL:
https://github.com/%{srcname}/%{srcname}
-Source0: %pypi_source %{srcname}
-
-BuildRequires: make
-BuildRequires: gcc
+# Sphinx-generated HTML documentation is not suitable for packaging; see
+#
https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion.
+#
+# We can generate PDF documentation as a lesser substitute.
+%bcond_without doc_pdf
+
+Name: python-fastavro
+Version: 1.4.5
+Release: 1%{?dist}
+Summary: Fast Avro for Python
+
+# The fastavro project is licensed MIT, but is derived from Apache Avro which
+# is ASL 2.0; see LICENSE and also NOTICE.txt.
+#
+# The following source files are specifically known to include ASL 2.0 content:
+#
+# • fastavro/_read_py.py
+# • fastavro/_write_py.py
+# • fastavro/_write.pyx
+# • fastavro/_read.pyx
+License: MIT and ASL 2.0
+URL:
https://github.com/fastavro/fastavro
+Source0: %{pypi_source fastavro}
# Upstream does not test, nor support 32 bit systems
# Issue:
https://github.com/fastavro/fastavro/issues/526
# Fedora bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1943932
-ExcludeArch: %{arm32} %{ix86}
-
-%description
-%{_description}
-
+ExcludeArch: %{arm32} %{ix86}
-%package -n python3-%{srcname}
-Summary: %{sum}
BuildRequires: python3-devel
BuildRequires: %{py3_dist Cython}
-BuildRequires: %{py3_dist numpy}
-BuildRequires: %{py3_dist pandas}
-BuildRequires: %{py3_dist pytest}
-BuildRequires: %{py3_dist python-dateutil}
-BuildRequires: %{py3_dist lz4}
-BuildRequires: %{py3_dist python-snappy}
-BuildRequires: %{py3_dist zstandard}
-BuildRequires: %{py3_dist setuptools}
+BuildRequires: gcc
+
+BuildRequires: make
BuildRequires: %{py3_dist sphinx}
BuildRequires: %{py3_dist sphinx_rtd_theme}
-Requires: %{py3_dist lz4}
-Requires: %{py3_dist python-snappy}
-Requires: %{py3_dist zstandard}
+%if %{with doc_pdf}
+BuildRequires: python3-sphinx-latex
+BuildRequires: latexmk
+%endif
-%description -n python3-%{srcname}
+%global _description %{expand: \
+Because the Apache Python avro package is written in pure Python, it is
+relatively slow. In one test case, it takes about 14 seconds to iterate through
+a file of 10,000 records. By comparison, the JAVA avro SDK reads the same file
+in 1.9 seconds.
+
+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).
+
+Supported Features
+
+ • File Writer
+ • File Reader (iterating via records or blocks)
+ • Schemaless Writer
+ • Schemaless Reader
+ • JSON Writer
+ • JSON Reader
+ • Codecs (Snappy, Deflate, Zstandard, Bzip2, LZ4, XZ)
+ • Schema resolution
+ • Aliases
+ • Logical Types
+ • Parsing schemas into the canonical form
+ • Schema fingerprinting
+
+Missing Features
+
+ • Anything involving Avro’s RPC features}
+
+%description
%{_description}
+
+%package -n python3-fastavro
+Summary: %{summary}
+
+%description -n python3-fastavro %{_description}
+
+
+%pyproject_extras_subpkg -n python3-fastavro codecs snappy zstandard lz4
+
+
%package doc
-Summary: %{sum}
+Summary: %{summary}
%description doc
-Documentation for %{name}.
+Documentation for python-fastavro.
+
%prep
-%autosetup -n %{srcname}-%{version}
-rm -rf *.egg-info
+%autosetup -n fastavro-%{version}
# Remove the already generated C files so we generate them ourselves
-find fastavro/ -name "*.c" -print -delete
+find fastavro/ -name '*.c' -print -delete
+
+
+%generate_buildrequires
+# codecs includes snappy, zstandard, and lz4
+%pyproject_buildrequires -x codecs
+# For some reason, combining this with the above does not work, even though it
+# should. It would be nice to investigate this.
+%pyproject_buildrequires developer_requirements.txt
+
%build
export FASTAVRO_USE_CYTHON=1
-%py3_build
+%pyproject_wheel
+
+(
+ # Temporary local installation so we can import the Cython extension module
+ # to build documentation:
+ PYTEMP="${PWD}/%{_vpath_builddir}/pytemp"
+ export PYTHONPATH="${PYTEMP}"
-# Needs to be inplace for the tests
-%{set_build_flags}
-%{__python3} %{py_setup} %{?py_setup_args} build_ext --inplace
+ %{__python3} -m pip install --target="${PYTEMP}" \
+ --no-deps --use-pep517 --no-build-isolation \
+ --disable-pip-version-check --no-clean --progress-bar off --verbose \
+ %{_pyproject_wheeldir}/*.whl
-pushd docs
- PYTHONPATH=../ make html man
- pushd _build/html
- rm .buildinfo -f || exit -1
- sed -i 's/\r$//' objects.inv
- iconv -f iso8859-1 -t utf-8 objects.inv > objects.inv.conv && mv -fv
objects.inv.conv objects.inv
- popd
-popd
+ %make_build -C docs man SPHINXOPTS='%{?_smp_mflags}'
+%if %{with doc_pdf}
+ %make_build -C docs latex SPHINXOPTS='%{?_smp_mflags}'
+ %make_build -C docs/_build/latex
+%endif
+
+ rm -rf "${PYTEMP}"
+)
%install
-export FASTAVRO_USE_CYTHON=1
-%py3_install
+%pyproject_install
+%pyproject_save_files fastavro
+
+install -t '%{buildroot}%{_mandir}/man1' -p -m 0644 -D \
+ 'docs/_build/man/fastavro.1'
-# Install man page
-install -v -p -D -m 0644 docs/_build/man/%{srcname}.1
%{buildroot}%{_mandir}/man1/%{srcname}.1 || exit -1
%check
-export FASTAVRO_USE_CYTHON=1
-PYTHONPATH=%{buildroot}%{python3_sitearch} pytest-%{python3_version}
+# Avoid importing the “un-built” package. The tests really assume we have built
+# the extensions in-place, and occasionally use relative paths to the package
+# source directory. We would prefer to test the extensions as installed (and
+# avoid an extra build step), so we use a symbolic link to make the tests
+# appear alongside the built package.
+mkdir -p _empty
+cd _empty
+cp -rp ../tests/ .
+ln -s '%{buildroot}%{python3_sitearch}/fastavro' .
+
+# These fail because there are no source lines in the tracebacks from Cython
+# modules, even though this works in the upstream CI. We haven’t figured out
+# the root cause, but it doesn’t seem to represent a real problem.
+k="${k-}${k+ and }not test_regular_vs_ordered_dict_map_typeerror"
+k="${k-}${k+ and }not test_regular_vs_ordered_dict_record_typeerror"
+
+%pytest -k "${k-}"
+
+
+%files -n python3-fastavro -f %{pyproject_files}
+# pyproject-rpm-macros takes care of the license files—both LICENSE and
+# NOTICE.txt—verify with “rpm -qL -p …”
+%{_bindir}/fastavro
+%{_mandir}/man1/fastavro.*
-%files -n python3-%{srcname}
-%license NOTICE.txt
-%{python3_sitearch}/%{srcname}-%{version}-py%{python3_version}.egg-info
-%{python3_sitearch}/%{srcname}/
-%{_bindir}/%{srcname}
-%{_mandir}/man1/%{srcname}.*
%files doc
+%license LICENSE NOTICE.txt
+%doc ChangeLog
%doc README.md
-%license NOTICE.txt
-%doc docs/_build/html
+%if %{with doc_pdf}
+%doc docs/_build/latex/fastavro.pdf
+%endif
+
%changelog
+* Mon Oct 11 2021 Benjamin A. Beasley <code(a)musicinmybrain.net> - 1.4.5-1
+- Update to 1.4.5 (close RHBZ#2007469)
+- Switch to pyproject-rpm-macros (“new guidelines”)
+- Add extras metapackages
+- Build PDF documentation instead of HTML due to JS bundling issues
+- Change license from ASL 2.0 to (MIT and ASL 2.0)
+
* Mon Aug 16 2021 Shane Allcroft <shaneallcroft AT fedoraproject DOT org> -
1.4.4-1
- Update to latest release
diff --git a/sources b/sources
index f09fa11..49a81f1 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (fastavro-1.4.4.tar.gz) =
5f17dd8434aba61636f20b36fe165769e1775f7dd1128ab59f1196a65d35197cece034d820fb48a5dcca5181f4290cfd9afe1c2f360333241951450364036276
+SHA512 (fastavro-1.4.5.tar.gz) =
22c31daa9dff10fb582c2fbff48a5c3205e9fd22e24783c1b4771f937aa21e3b3fa74c73be97199176ebc86088db717cb7233096c6d7f42a871fa038de542108