diff --git a/python-blosc.spec b/python-blosc.spec index 18583af..7b31b60 100644 --- a/python-blosc.spec +++ b/python-blosc.spec @@ -1,7 +1,4 @@ -%global with_python3 0%{?fedora} - -%global __provides_filter_from ^%{python_sitearch}/.*\\.so$ -%global __provides_filter_from ^%{python3_sitearch}/.*\\.so$ +%global __provides_exclude_from ^(%{python2_sitearch}|%{python3_sitearch})/.*\\.so$ %global module blosc @@ -11,7 +8,7 @@ Summary: Python wrapper for the Blosc high performance compressor Name: python-%{module} Version: 1.2.8 -Release: 2%{?dist} +Release: 3%{?dist} License: MIT URL: https://github.com/FrancescAlted/python-blosc Source0: https://pypi.python.org/packages/source/b/%{module}/%{module}-%{version}.tar.gz @@ -34,19 +31,17 @@ Summary: %{summary} %description -n python2-%{module} %{summary}. -%if 0%{?with_python3} -%package -n python3-%{module} +%package -n python%{python3_pkgversion}-%{module} Summary: Python wrapper for the blosc high performance compressor -BuildRequires: python3-devel -BuildRequires: python3-numpy -BuildRequires: python3-psutil -%{?python_provide:%python_provide python3-blosc} -%{?fedora:Recommends: python3-numpy} +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-numpy +BuildRequires: python%{python3_pkgversion}-psutil +%{?python_provide:%python_provide python%{python3_pkgversion}-blosc} +%{?fedora:Recommends: python%{python3_pkgversion}-numpy} -%description -n python3-%{module} +%description -n python%{python3_pkgversion}-%{module} %{summary}. -%endif %prep %autosetup -n %{module}-%{version} -p1 @@ -57,15 +52,16 @@ sed -i "s|CFLAGS\.append(\"-msse2\")|pass|" setup.py %build export BLOSC_DIR=%{_libdir}/blosc CFLAGS="%{optflags}" %py2_build -%if 0%{?with_python3} %py3_build -%endif %install %py2_install -%if 0%{?with_python3} %py3_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())' %files -n python2-%{module} %{python2_sitearch}/blosc/ @@ -73,22 +69,17 @@ export BLOSC_DIR=%{_libdir}/blosc CFLAGS="%{optflags}" %license LICENSES/PYTHON-BLOSC.txt %doc README.rst RELEASE_NOTES.rst -%if 0%{?with_python3} -%files -n python3-%{module} +%files -n python%{python3_pkgversion}-%{module} %{python3_sitearch}/blosc/ %{python3_sitearch}/blosc-%{version}*-py*.egg-info %license LICENSES/PYTHON-BLOSC.txt %doc README.rst RELEASE_NOTES.rst -%endif - -%check -cd / # avoid interference with build dir -PYTHONPATH=%{buildroot}%{python2_sitearch} python -c 'import sys, blosc; sys.exit(blosc.test())' -%if 0%{?with_python3} -PYTHONPATH=%{buildroot}%{python3_sitearch} python3 -c 'import sys, blosc; sys.exit(blosc.test())' -%endif %changelog +* Mon May 16 2016 Orion Poplawski - 1.2.8-3 +- Fix provides filter +- Use %%python3_pkgversion for EPEL7 compatibility + * Sat Feb 13 2016 Zbigniew Jędrzejewski-Szmek - 1.2.8-2 - Add dependency on psutil to check for leaks during build - Fix build (#1307896)