## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec Name: python-zlib-ng Version: 0.5.0 Release: %autorelease Summary: Drop-in replacement for zlib and gzip modules using zlib-ng # The entire source is PSF-2.0, since we do not use the vendored zlib-ng # sources that would be present in the PyPI sdist. We use the GitHub archive # because it contains tests and changelogs that the PyPI sdist lacks. License: PSF-2.0 URL: https://github.com/pycompression/python-zlib-ng Source: %{url}/archive/v%{version}/python-zlib-ng-%{version}.tar.gz BuildRequires: python3-devel BuildRequires: gcc BuildRequires: pkgconfig(zlib-ng) # For convincing versioningit to do the right thing with a GitHub archive: BuildRequires: git-core # List test dependencies manually because this is easier than patching coverage # out of tox.ini # (https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters). BuildRequires: %{py3_dist pytest} BuildRequires: %{py3_dist pytest-timeout} BuildRequires: python3-test %global common_description %{expand: Faster zlib and gzip compatible compression and decompression by providing Python bindings for the zlib-ng library. This package provides Python bindings for the zlib-ng library. python-zlib-ng provides the bindings by offering three modules: • zlib_ng: A drop-in replacement for the zlib module that uses zlib-ng to accelerate its performance. • gzip_ng: A drop-in replacement for the gzip module that uses zlib_ng instead of zlib to perform its compression and checksum tasks, which improves performance. • gzip_ng_threaded offers an open function which returns buffered read or write streams that can be used to read and write large files while escaping the GIL using one or multiple threads. This functionality only works for streaming, seeking is not supported. zlib_ng and gzip_ng are almost fully compatible with zlib and gzip from the Python standard library. There are some minor differences see: https://pypi.org/project/zlib-ng/#differences-with-zlib-and-gzip-modules Beginning with Fedora Linux 40, zlib-ng provides the system-wide zlib implementation, so the Python standard library already uses it by default. However, some projects still need the APIs provided by this package.} %description %{common_description} %package -n python3-zlib-ng Summary: %{summary} %description -n python3-zlib-ng %{common_description} %prep %autosetup -S git -p1 # Remove bundled zlib-ng library if present (not in GitHub archive because it # is a git submodule, so this is just an extra precaution). rm -rvf src/zlib_ng/zlib-ng # For versioningit: git tag v%{version} %generate_buildrequires %pyproject_buildrequires %build export CFLAGS="${CFLAGS} $(pkgconf --cflags zlib-ng)" export LDFLAGS="${LDFLAGS} $(pkgconf --libs zlib-ng)" export PYTHON_ZLIB_NG_LINK_DYNAMIC='1' %pyproject_wheel %install %pyproject_install %pyproject_save_files -l zlib_ng %check # It is difficult for us to run the CLI tests in this environment. We get: # # ModuleNotFoundError: No module named 'zlib_ng' # # … or similar, because test.support.script_helper from python3-test does not # respect the PYTHONPATH set by the %%pytest macro. # # We choose to skip these few tests rather than putting a lot of effort into # perhaps making it possible to run them. k="${k-}${k+ and }not TestCommandLine" # Note that it is *not* safe to run tests in parallel (pytest-xdist, -n auto) # due to filesystem race conditions. %pytest -v -k "${k-}" tests/ %files -n python3-zlib-ng -f %{pyproject_files} %doc CHANGELOG.rst %doc README.rst %changelog ## START: Generated by rpmautospec * Fri Aug 09 2024 Packit - 0.5.0-1 - Update to 0.5.0 upstream release - Resolves: rhbz#2303861 * Fri Jul 19 2024 Fedora Release Engineering - 0.4.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Fri Jun 07 2024 Python Maint - 0.4.3-3 - Rebuilt for Python 3.13 * Wed May 15 2024 Benjamin A. Beasley - 0.4.3-2 - Backport proposed Python 3.13 bug fix (fix RHBZ#2280571) * Tue Apr 16 2024 Packit - 0.4.3-1 - Update to 0.4.3 upstream release - Resolves: rhbz#2275298 * Wed Apr 10 2024 Packit - 0.4.2-1 - Update to 0.4.2 upstream release - Resolves: rhbz#2274336 * Mon Mar 11 2024 Packit - 0.4.1-1 - [packit] 0.4.1 upstream release - Resolves rhbz#2269022 * Tue Jan 23 2024 Benjamin A. Beasley - 0.4.0-3 - Fix Python 3.13 compatibility (close RHBZ#2259627) * Mon Jan 22 2024 Fedora Release Engineering - 0.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sat Jan 13 2024 Benjamin A. Beasley - 0.4.0-1 - Initial package (close RHBZ#2257548) ## END: Generated by rpmautospec