From edc793e3ca3536058671e189f8ac75c08f2b7e11 Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: Sep 07 2021 10:31:55 +0000 Subject: Import python-zstd-1.4.5.1-3.el9 in CloudSIG xena --- diff --git a/.python-zstd.metadata b/.python-zstd.metadata new file mode 100644 index 0000000..d389693 --- /dev/null +++ b/.python-zstd.metadata @@ -0,0 +1 @@ +149470fa88344ad86917c715dd5e8e4c36a3ad6a SOURCES/zstd-1.4.5.1.tar.gz diff --git a/SOURCES/README.md b/SOURCES/README.md new file mode 100644 index 0000000..963153d --- /dev/null +++ b/SOURCES/README.md @@ -0,0 +1,3 @@ +# python-zstd + +The python-zstd package diff --git a/SOURCES/python-zstd-1.4.5.1-test-external.patch b/SOURCES/python-zstd-1.4.5.1-test-external.patch new file mode 100644 index 0000000..9b99d16 --- /dev/null +++ b/SOURCES/python-zstd-1.4.5.1-test-external.patch @@ -0,0 +1,11 @@ +--- zstd-1.3.8.1/setup.py.orig 2019-03-04 17:40:51.208528890 +0700 ++++ zstd-1.3.8.1/setup.py 2019-03-04 17:58:37.644953996 +0700 +@@ -97,6 +97,8 @@ + class ZstdBuildExt( build_ext ): + + def build_extensions(self): ++ if 'test' in sys.argv: return ++ + c = self.compiler.compiler_type + if c in COPT: + for e in self.extensions: diff --git a/SOURCES/python-zstd-1.4.5.1-test-once.patch b/SOURCES/python-zstd-1.4.5.1-test-once.patch new file mode 100644 index 0000000..3246edf --- /dev/null +++ b/SOURCES/python-zstd-1.4.5.1-test-once.patch @@ -0,0 +1,10 @@ +--- zstd-1.3.8.1/setup.py.orig 2019-03-04 17:40:51.208528890 +0700 ++++ zstd-1.3.8.1/setup.py 2019-03-04 17:58:37.644953996 +0700 +@@ -171,7 +173,6 @@ + Extension('zstd', zstdFiles, libraries=ext_libraries) + ], + cmdclass = {'build_ext': ZstdBuildExt }, +- test_suite='setup.my_test_suite', + classifiers=[ + 'License :: OSI Approved :: BSD License', + 'Intended Audience :: Developers', diff --git a/SPECS/python-zstd.spec b/SPECS/python-zstd.spec new file mode 100644 index 0000000..1cfea3d --- /dev/null +++ b/SPECS/python-zstd.spec @@ -0,0 +1,69 @@ +%global pypi_name zstd +%global zstd_version 1.4.5 + +Name: python-%{pypi_name} +Version: %{zstd_version}.1 +Release: 3%{?dist} +Summary: Zstd Bindings for Python + +License: BSD +URL: https://github.com/sergey-dryabzhinsky/python-zstd +Source0: %{pypi_source} + +# Patches to fix test execution +Patch0: python-zstd-1.4.5.1-test-external.patch +Patch1: python-zstd-1.4.5.1-test-once.patch + +BuildRequires: gcc +BuildRequires: python3-devel +BuildRequires: python3dist(setuptools) +BuildRequires: pkgconfig(libzstd) >= %{zstd_version} + +%description +Simple Python bindings for the Zstd compression library. + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} +# The library does not do symbol versioning to fully match automatically on +Requires: libzstd%{?_isa} >= %{zstd_version} + +%description -n python3-%{pypi_name} +Simple Python bindings for the Zstd compression library. + + +%prep +%autosetup -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info +# Remove bundled zstd library +rm -rf zstd/ +# do not test the version matching, we don't really need exact version of +# zstd here +rm tests/test_version.py +sed -i -e '/test_version/d' tests/__init__.py + +%build +%py3_build -- --legacy --pyzstd-legacy --external + +%install +%py3_install + +%check +%{__python3} setup.py test + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.rst +%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info +%{python3_sitearch}/%{pypi_name}*.so + +%changelog +* Wed Jan 27 2021 Fedora Release Engineering - 1.4.5.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Sep 21 2020 Joel Capitao - 1.4.5.1-2 +- Edit macro for CentOS interoperability + +* Sun Aug 23 2020 Neal Gompa - 1.4.5.1-1 +- Initial package (#1870571)