bc2992e
%if 0%{?rhel}
bc2992e
%bcond_with check
bc2992e
%else
060e884
%bcond_without check
bc2992e
%endif
bc2992e
060e884
%global pypi_name zstandard
060e884
%if 0%{!?pytest:1}
060e884
%global pytest %{expand:\\\
060e884
  CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
060e884
  PATH="%{buildroot}%{_bindir}:$PATH"\\\
060e884
  PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}"\\\
060e884
  PYTHONDONTWRITEBYTECODE=1\\\
060e884
  /usr/bin/pytest}
060e884
%endif
060e884
060e884
%global desc This project provides Python bindings for interfacing with the Zstandard\
060e884
compression library. A C extension and CFFI interface are provided.
060e884
060e884
Name: python-%{pypi_name}
4456dcb
Version: 0.21.0
480421d
Release: 3%{?dist}
060e884
Summary: Zstandard bindings for Python
08b2cc5
License: BSD and GPLv2
060e884
URL: https://github.com/indygreg/python-zstandard
060e884
Source0: %{pypi_source}
060e884
060e884
%description
060e884
%{desc}
060e884
060e884
%package -n python3-%{pypi_name}
060e884
Summary: %{summary}
060e884
BuildRequires: gcc
060e884
BuildRequires: libzstd-devel
060e884
BuildRequires: python3-devel
dc4945c
BuildRequires: python3-setuptools
060e884
BuildRequires: python3-cffi
060e884
%if %{with check}
060e884
BuildRequires: python3-hypothesis
060e884
BuildRequires: python3-pytest
060e884
BuildRequires: python3-pytest-xdist
060e884
%endif
060e884
# https://github.com/indygreg/python-zstandard/issues/48
4456dcb
Provides: bundled(zstd) = 1.5.5
060e884
060e884
%description -n python3-%{pypi_name}
060e884
%{desc}
060e884
060e884
%prep
060e884
%setup -q -n %{pypi_name}-%{version}
060e884
rm -r %{pypi_name}.egg-info
060e884
060e884
%build
060e884
%py3_build
060e884
060e884
%install
060e884
%py3_install
060e884
060e884
%if %{with check}
060e884
%check
08b2cc5
mv zstandard{,.src}
060e884
export ZSTD_SLOW_TESTS=1
060e884
%pytest -v\
060e884
        --numprocesses=auto
08b2cc5
mv zstandard{.src,}
060e884
%endif
060e884
060e884
%files -n python3-%{pypi_name}
08b2cc5
%license LICENSE zstd/COPYING
08b2cc5
%doc README.rst
060e884
%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
060e884
%{python3_sitearch}/%{pypi_name}
060e884
060e884
%changelog
480421d
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.21.0-3
480421d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
480421d
3b998af
* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 0.21.0-2
3b998af
- Rebuilt for Python 3.12
3b998af
4456dcb
* Wed May 24 2023 Dominik Mierzejewski <dominik@greysector.net> - 0.21.0-1
4456dcb
- update to 0.21.0 (#2172363)
4456dcb
- bump bundled zstd version
4456dcb
82ce235
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.19.0-2
82ce235
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
82ce235
2efbd53
* Wed Nov 02 2022 Dominik Mierzejewski <dominik@greysector.net> 0.19.0-1
2efbd53
- update to 0.19.0 (#2138646)
2efbd53
a0e513f
* Wed Oct 05 2022 Dominik Mierzejewski <dominik@greysector.net> 0.18.0-1
a0e513f
- update to 0.18.0 (#2099853)
a0e513f
cf4d17a
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.0-3
cf4d17a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
cf4d17a
667255e
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 0.17.0-2
667255e
- Rebuilt for Python 3.11
667255e
cea6127
* Tue Feb 15 2022 Dominik Mierzejewski <dominik@greysector.net> 0.17.0-1
cea6127
- update to 0.17.0 (#2042593)
cea6127
- drop obsolete patch
cea6127
4697318
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.0-2
4697318
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
4697318
fd918ee
* Mon Oct 18 2021 Dominik Mierzejewski <dominik@greysector.net> 0.16.0-1
fd918ee
- update to 0.16.0 (#2014873)
fd918ee
- drop obsolete patch
fd918ee
- improve patch for inconsistent `closed` attribute issue
fd918ee
1d4cf30
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.2-3
1d4cf30
- Second attempt - Rebuilt for
1d4cf30
  https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
1d4cf30
8310d1a
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.15.2-2
8310d1a
- Rebuilt for Python 3.10
8310d1a
e83c63f
* Mon Mar 01 2021 Dominik Mierzejewski <dominik@greysector.net> 0.15.2-1
e83c63f
- update to 0.15.2 (#1933476)
3b17214
- fix tests on s390x
3b17214
08b2cc5
* Wed Feb 03 2021 Dominik Mierzejewski <dominik@greysector.net> 0.15.1-1
08b2cc5
- update to 0.15.1 (#1924620)
08b2cc5
- work around weird test failure
193847b
- fix tests on i686 and s390x
08b2cc5
42dbb2a
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.0-3
42dbb2a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
42dbb2a
ccc3e3a
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.0-2
ccc3e3a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
ccc3e3a
060e884
* Fri May 29 2020 Dominik Mierzejewski <dominik@greysector.net> 0.13.0-1
060e884
- initial build
060e884
- skip some tests on s390x (https://github.com/indygreg/python-zstandard/issues/105)
060e884