Blame python-zstd.spec

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