Build for python3_other

This commit is contained in:
Orion Poplawski 2018-11-12 20:38:59 -07:00
commit 31ac0a3943

View file

@ -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 <orion@cora.nwra.com> - 1.2.8-3
- Fix provides filter