From 31ac0a39432e33e5790c56990e3c4322684e54ee Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 12 Nov 2018 20:38:59 -0700 Subject: [PATCH] Build for python3_other --- python-blosc.spec | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/python-blosc.spec b/python-blosc.spec index 637559c..a846ea6 100644 --- a/python-blosc.spec +++ b/python-blosc.spec @@ -45,6 +45,21 @@ BuildRequires: python%{python3_pkgversion}-psutil %description -n python%{python3_pkgversion}-%{module} %{summary}. +%if 0%{?python3_other_pkgversion} +%package -n python%{python3_other_pkgversion}-%{module} +Summary: Python wrapper for the blosc high performance compressor + +BuildRequires: python%{python3_other_pkgversion}-devel +BuildRequires: python%{python3_other_pkgversion}-setuptools +BuildRequires: python%{python3_other_pkgversion}-numpy +BuildRequires: python%{python3_other_pkgversion}-psutil +%{?python_provide:%python_provide python%{python3_other_pkgversion}-blosc} +%{?fedora:Recommends: python%{python3_other_pkgversion}-numpy} + +%description -n python%{python3_other_pkgversion}-%{module} +%{summary}. +%endif + %prep %autosetup -n %{module}-%{version} -p1 @@ -55,15 +70,24 @@ sed -i "s|CFLAGS\.append(\"-msse2\")|pass|" setup.py export BLOSC_DIR=%{_libdir}/blosc CFLAGS="%{optflags}" %py2_build %py3_build +%if 0%{?python3_other_pkgversion} +%py3_other_build +%endif %install %py2_install %py3_install +%if 0%{?python3_other_pkgversion} +%py3_other_install +%endif %check cd / # avoid interference with build dir -PYTHONPATH=%{buildroot}%{python2_sitearch} python -c 'import sys, blosc; sys.exit(blosc.test())' -PYTHONPATH=%{buildroot}%{python3_sitearch} python3 -c 'import sys, blosc; sys.exit(blosc.test())' +PYTHONPATH=%{buildroot}%{python2_sitearch} %{__python2} -c 'import sys, blosc; sys.exit(blosc.test())' +PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -c 'import sys, blosc; sys.exit(blosc.test())' +%if 0%{?python3_other_pkgversion} +PYTHONPATH=%{buildroot}%{python3_other_sitearch} %{__python3_other} -c 'import sys, blosc; sys.exit(blosc.test())' +%endif %files -n python2-%{module} %{python2_sitearch}/blosc/ @@ -77,6 +101,14 @@ PYTHONPATH=%{buildroot}%{python3_sitearch} python3 -c 'import sys, blosc; sys.ex %license LICENSES/PYTHON-BLOSC.txt %doc README.rst RELEASE_NOTES.rst +%if 0%{?python3_other_pkgversion} +%files -n python%{python3_other_pkgversion}-%{module} +%{python3_other_sitearch}/blosc/ +%{python3_other_sitearch}/blosc-%{version}*-py*.egg-info +%license LICENSES/PYTHON-BLOSC.txt +%doc README.rst RELEASE_NOTES.rst +%endif + %changelog * Mon May 16 2016 Orion Poplawski - 1.2.8-3 - Fix provides filter