0f0a4c1
%global srcname lz4
0f0a4c1
0f0a4c1
Name:           python-%{srcname}
5c3c094
Version:        3.0.2
d370f38
Release:        6%{?dist}
d2e860b
URL:            https://github.com/%{name}/%{name}
0f0a4c1
Summary:        LZ4 Bindings for Python
0f0a4c1
License:        BSD
Orion Poplawski 53a736a
Source:         https://files.pythonhosted.org/packages/source/l/%{srcname}/%{srcname}-%{version}.tar.gz
0f0a4c1
d32e8c4
# Add readall to LZ4FrameFile and use it on Python 3.10+
d32e8c4
# Fixes https://github.com/python-lz4/python-lz4/issues/219
d32e8c4
# Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1959006
d32e8c4
Patch1:         https://github.com/python-lz4/python-lz4/pull/220.patch
d32e8c4
422dfe3
BuildRequires:  lz4-devel
0d07cd8
BuildRequires:  gcc
422dfe3
422dfe3
BuildRequires:  python3-devel
422dfe3
BuildRequires:  python3-setuptools
422dfe3
BuildRequires:  python3-setuptools_scm
422dfe3
BuildRequires:  python3-pytest
422dfe3
BuildRequires:  python3-pytest-runner
422dfe3
BuildRequires:  python3-pkgconfig
422dfe3
BuildRequires:  python3-future
bc8ed23
# For tests
fceb6dc
BuildRequires:  python3-psutil
d09fd19
BuildRequires:  python3-pytest-cov
bc8ed23
# For docs
64c5024
BuildRequires:  python3-sphinx
64c5024
BuildRequires:  python3-sphinx-bootstrap-theme
0f0a4c1
0f0a4c1
%description
5b285e7
Python bindings for the lz4 compression library.
5b285e7
422dfe3
422dfe3
%package -n python3-lz4
5b285e7
Summary:        LZ4 Bindings for Python 3
422dfe3
%{?python_provide:%python_provide python3-%{srcname}}
0f0a4c1
422dfe3
%description -n python3-lz4
5b285e7
Python 3 bindings for the lz4 compression library.
0f0a4c1
0f0a4c1
0f0a4c1
%prep
5b285e7
%autosetup -n %{srcname}-%{version} -p1
0f0a4c1
5b285e7
# Remove bundled lz4 as we're building against system lib
Alan Pevec b4e739f
rm lz4libs/lz4*.[ch]
0f0a4c1
0f0a4c1
0f0a4c1
%build
5b285e7
%py3_build
0f0a4c1
0f0a4c1
0f0a4c1
%install
5b285e7
%py3_install
0f0a4c1
# Fix permissions on shared objects
0f0a4c1
find %{buildroot}%{python3_sitearch} -name 'lz4*.so' \
0f0a4c1
    -exec chmod 0755 {} \;
0f0a4c1
33ab6e5
# Build HTML docs
33ab6e5
pushd docs
31f226b
PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch} make html
33ab6e5
popd
33ab6e5
mv docs/_build/html ./html
33ab6e5
0f0a4c1
0f0a4c1
%check
422dfe3
# First we'll just try importing, then run the tests
b6ffe0d
PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch} %{__python3} -c "import lz4"
937201e
947cffc
# The test tries to allocate crazy amounts of memory and fails.
947cffc
# Let's use the same switch it uses in upstream CI to skip some tests.
947cffc
TRAVIS=1 %{__python3} setup.py test
33ab6e5
33ab6e5
pushd docs
31f226b
PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch} make doctest
33ab6e5
popd
093f167
5b285e7
422dfe3
%files -n python3-lz4
a00eec6
%license LICENSE
33ab6e5
%doc README.rst html
0f0a4c1
%{python3_sitearch}/lz4*
5b285e7
0f0a4c1
0f0a4c1
%changelog
d370f38
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 3.0.2-6
d370f38
- Rebuilt for Python 3.10
d370f38
bbccf59
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-5
bbccf59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
bbccf59
322adc0
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-4
322adc0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
322adc0
e69d25f
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.2-3
e69d25f
- Rebuilt for Python 3.9
e69d25f
2ab13b0
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-2
2ab13b0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
2ab13b0
5c3c094
* Sun Dec 29 2019 Jonathan Underwood <jonathan.underwood@gmail.com> - 3.0.2-1
5c3c094
- Update to version 3.0.2
937201e
- Disable tests on Arm due to insufficient RAM
5c3c094
36f1bf7
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.1.2-6
36f1bf7
- Rebuilt for Python 3.8.0rc1 (#1748018)
36f1bf7
aad9b0d
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.1.2-5
aad9b0d
- Rebuilt for Python 3.8
aad9b0d
d359d83
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.2-4
d359d83
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
d359d83
816fa43
* Wed Mar 27 2019 Miro Hrončok <mhroncok@redhat.com> - 2.1.2-3
816fa43
- Subpackage python2-lz4 has been removed
816fa43
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
816fa43
a0d2903
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.2-2
a0d2903
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
a0d2903
e1024bb
* Sun Nov  4 2018 Jonathan Underwood <jonathan.underwood@gmail.com> - 2.1.2-1
e1024bb
- Update to version 2.1.2
e1024bb
2ab2298
* Thu Aug  9 2018 Jonathan Underwood <jonathan.underwood@gmail.com> - 2.1.0-1
2ab2298
- Update to version 2.1.0
2ab2298
4e68979
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-2
4e68979
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
4e68979
2faf947
* Sat Jul  7 2018 Jonathan Underwood <jonathan.underwood@gmail.com> - 2.0.2-1
2faf947
- Update to version 2.0.2
2faf947
60fd98d
* Sun Jun 24 2018 Jonathan Underwood <jonathan.underwood@gmail.com> - 2.0.1-2
60fd98d
- Bump release and rebuild for f29-python side tag
60fd98d
850f5c2
* Thu Jun 21 2018 Jonathan Underwood <jonathan.underwood@gmail.com> - 2.0.1-1
850f5c2
- Update to version 2.0.1
850f5c2
fceb6dc
* Wed Jun 20 2018 Jonathan Underwood <jonathan.underwood@gmail.com> - 2.0.0-2
fceb6dc
- Add BuildRequires for python{2,3}-psutil for tests
fceb6dc
a4752f0
* Wed Jun 20 2018 Jonathan Underwood <jonathan.underwood@gmail.com> - 2.0.0-1
a4752f0
- Update to version 2.0.0
a4752f0
1c970e2
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.1.0-3
1c970e2
- Rebuilt for Python 3.7
1c970e2
c298280
* Sat Apr 28 2018 Jonathan Underwood <jonathan.underwood@gmail.com> - 1.1.0-2
c298280
- Add a Requires for python2-future to python2 package (BZ 1571130)
c298280
49d8209
* Tue Apr  3 2018 Jonathan Underwood <jonathan.underwood@gmail.com> - 1.1.0-1
49d8209
- Update to version 1.1.0 (fixes BZ#1553856)
49d8209
45797c9
* Tue Apr  3 2018 Jonathan Underwood <jonathan.underwood@gmail.com> - 1.0.1-3
45797c9
- Update to version 1.0.1
33ab6e5
- Build and package html docs
33ab6e5
- Run make doctest during %%check
33ab6e5
0d07cd8
* Sun Feb 18 2018 Jonathan Underwood <jonathan.underwood@gmail.com> - 1.0.0-2
0d07cd8
- Add a BuildRequires for gcc
0d07cd8
065063f
* Sun Feb 18 2018 Jonathan Underwood <jonathan.underwood@gmail.com> - 1.0.0-1
065063f
- Update to version 1.0.0
065063f
e7b8752
* Wed Feb 14 2018 Jonathan Underwood <jonathan.underwood@gmail.com> - 0.23.2-1
e7b8752
- Update to 0.23.2
e7b8752
e8352de
* Sun Feb 11 2018 Jonathan Underwood <jonathan.underwood@gmail.com> - 0.23.1-4
e8352de
- Rebuild for fixed spec
e8352de
e8352de
* Sun Feb 11 2018 Jonathan Underwood <jonathan.underwood@gmail.com> - 0.23.1-3
8c1e4e9
- Rebuild for fixed spec
8c1e4e9
8c1e4e9
* Sun Feb 11 2018 Jonathan Underwood <jonathan.underwood@gmail.com> - 0.23.1-2
a00eec6
- Add LICENSE file to packages
a00eec6
a00eec6
* Sun Feb 11 2018 Jonathan Underwood <jonathan.underwood@gmail.com> - 0.23.1-1
422dfe3
- Update to 0.23.1
422dfe3
- Update BuildRequires
422dfe3
- Spec file cleanups
422dfe3
176b2c7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.4-5
176b2c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
176b2c7
d304adb
* Thu Jan 25 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.9.4-4
d304adb
- Update Python 2 dependency declarations to new packaging standards
d304adb
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
d304adb
68ee01a
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.4-3
68ee01a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
68ee01a
2d57759
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.4-2
2d57759
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
2d57759
b6ffe0d
* Fri Jun  2 2017 Haïkel Guémar <hguemar@fedoraproject.org> - 0.9.4-1
b6ffe0d
- Upstream 0.9.4
b6ffe0d
- Fix BR
b6ffe0d
Alan Pevec b4e739f
* Mon Mar 13 2017 Alan Pevec <alan.pevec@redhat.com> 0.9.0-1
Alan Pevec b4e739f
- Update to 0.9.0
Alan Pevec b4e739f
21bb5a7
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-3
21bb5a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
21bb5a7
ca422ae
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.8.2-2
ca422ae
- Rebuild for Python 3.6
ca422ae
Orion Poplawski 53a736a
* Tue Nov  8 2016 Orion Poplawski <orion@cora.nwra.com> - 0.8.2-1
Orion Poplawski 53a736a
- Update to 0.8.2
Orion Poplawski 53a736a
- Enable EPEL7 builds
Orion Poplawski 53a736a
bf5f007
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-2
bf5f007
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
bf5f007
d2e860b
* Wed Apr 27 2016 Jonathan Underwood <jonathan.underwood@gmail.com> - 0.8.1-1
d2e860b
- Update to 0.8.1
d2e860b
- Use new upstream URL
d2e860b
- Drop upstreamed patch
d2e860b
- Use PyPi source url with hash, for now
d2e860b
5b285e7
* Sun Feb 28 2016 Jonathan Underwood <jonathan.underwood@gmail.com> - 0.7.0-6
5b285e7
- Spec file cleanup
5b285e7
- Add use of python_provide macro
5b285e7
- Remove python 3 conditional build - always build
5b285e7
- Use standard python packaging build and install macros
5b285e7
9fe3df2
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-5
9fe3df2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
9fe3df2
Robert Kuska 89dcdbb
* Fri Nov 06 2015 Robert Kuska <rkuska@redhat.com> - 0.7.0-4
Robert Kuska 89dcdbb
- Rebuilt for Python3.5 rebuild
Robert Kuska 89dcdbb
093f167
* Mon Jun 29 2015 Jonathan Underwood <jonathan.underwood@gmail.com> - 0.7.0-3
093f167
- Update patch to build against system libs and add compress_fast method
093f167
- Add BR for python[3]-nose
093f167
- Run bundled test in %%check
093f167
0f0a4c1
* Sat Jun 27 2015 Jonathan Underwood <jonathan.underwood@gmail.com> - 0.7.0-2
0f0a4c1
- Drop unneeded Requires for lz4
0f0a4c1
- Remove commented out cruft from spec
0f0a4c1
- Regenerate setup.py patch to use libraries=["lz4"]
0f0a4c1
- Remove bundled lz4 code in %%prep
0f0a4c1
0f0a4c1
* Sat Jun 27 2015 Jonathan Underwood <jonathan.underwood@gmail.com> - 0.7.0-1
0f0a4c1
- Build against system lz4 libs
0f0a4c1
- Rudimentary check to see if we can import the module
0f0a4c1
0f0a4c1
* Sat Jun 27 2015 Jonathan Underwood <jonathan.underwood@gmail.com> - 0.7.0-0.2
0f0a4c1
- Include README.rst in python3 package as well
0f0a4c1
0f0a4c1
* Sat Jun 27 2015 Jonathan Underwood <jonathan.underwood@gmail.com> - 0.7.0-0.1
0f0a4c1
- Fix permissions of shared objects to be 0755
0f0a4c1
0f0a4c1
* Sat Jun 27 2015 Jonathan Underwood <jonathan.underwood@gmail.com> - 0.7.0-0
0f0a4c1
- Initial package for Fedora
0f0a4c1