Blame SPECS/python-zstd.spec

edc793
%global pypi_name zstd
edc793
%global zstd_version 1.4.5
edc793
edc793
Name:           python-%{pypi_name}
edc793
Version:        %{zstd_version}.1
edc793
Release:        3%{?dist}
edc793
Summary:        Zstd Bindings for Python
edc793
edc793
License:        BSD
edc793
URL:            https://github.com/sergey-dryabzhinsky/python-zstd
edc793
Source0:        %{pypi_source}
edc793
edc793
# Patches to fix test execution
edc793
Patch0:         python-zstd-1.4.5.1-test-external.patch
edc793
Patch1:         python-zstd-1.4.5.1-test-once.patch
edc793
edc793
BuildRequires:  gcc
edc793
BuildRequires:  python3-devel
edc793
BuildRequires:  python3dist(setuptools)
edc793
BuildRequires:  pkgconfig(libzstd) >= %{zstd_version}
edc793
edc793
%description
edc793
Simple Python bindings for the Zstd compression library.
edc793
edc793
%package -n     python3-%{pypi_name}
edc793
Summary:        %{summary}
edc793
%{?python_provide:%python_provide python3-%{pypi_name}}
edc793
# The library does not do symbol versioning to fully match automatically on
edc793
Requires:       libzstd%{?_isa} >= %{zstd_version}
edc793
edc793
%description -n python3-%{pypi_name}
edc793
Simple Python bindings for the Zstd compression library.
edc793
edc793
edc793
%prep
edc793
%autosetup -n %{pypi_name}-%{version}
edc793
# Remove bundled egg-info
edc793
rm -rf %{pypi_name}.egg-info
edc793
# Remove bundled zstd library
edc793
rm -rf zstd/
edc793
# do not test the version matching, we don't really need exact version of
edc793
# zstd here
edc793
rm tests/test_version.py
edc793
sed -i -e '/test_version/d' tests/__init__.py
edc793
edc793
%build
edc793
%py3_build -- --legacy --pyzstd-legacy --external
edc793
edc793
%install
edc793
%py3_install
edc793
edc793
%check
edc793
%{__python3} setup.py test
edc793
edc793
%files -n python3-%{pypi_name}
edc793
%license LICENSE
edc793
%doc README.rst
edc793
%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
edc793
%{python3_sitearch}/%{pypi_name}*.so
edc793
edc793
%changelog
edc793
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5.1-3
edc793
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
edc793
edc793
* Mon Sep 21 2020 Joel Capitao <jcapitao@redhat.com> - 1.4.5.1-2
edc793
- Edit macro for CentOS interoperability
edc793
edc793
* Sun Aug 23 2020 Neal Gompa <ngompa13@gmail.com> - 1.4.5.1-1
edc793
- Initial package (#1870571)