Accepting request 319398 from home:TheBlackCat:branches:devel:languages:python
- Remove unneeded numpy dependency to avoid dependency loop. - create dummy alternative to avoid 13.1's post-build-check bug - fixing update_alternatives OBS-URL: https://build.opensuse.org/request/show/319398 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Cython?expand=0&rev=59
This commit is contained in:
parent
23073e6890
commit
888bd2a4a3
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jul 29 11:52:24 UTC 2015 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Remove unneeded numpy dependency to avoid dependency loop.
|
||||||
|
- create dummy alternative to avoid 13.1's post-build-check bug
|
||||||
|
- specfile:
|
||||||
|
* fixing update_alternatives
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jul 10 21:59:38 UTC 2015 - termim@gmail.com
|
Fri Jul 10 21:59:38 UTC 2015 - termim@gmail.com
|
||||||
|
|
||||||
|
@ -29,14 +29,12 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: python-numpy
|
|
||||||
BuildRequires: python-numpy-devel
|
|
||||||
BuildRequires: python-xml
|
BuildRequires: python-xml
|
||||||
Provides: python-cython = %{version}
|
|
||||||
Obsoletes: python-cython < %{version}
|
|
||||||
Requires: python-xml
|
Requires: python-xml
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
|
Provides: python-cython = %{version}
|
||||||
|
Obsoletes: python-cython < %{version}
|
||||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||||
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||||
%endif
|
%endif
|
||||||
@ -68,20 +66,18 @@ CFLAGS="%{optflags}" python setup.py build
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||||
|
|
||||||
# Prepare for update-alternatives usage
|
# Prepare for update-alternatives usage
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for p in cython cythonize cygdb ; do
|
for p in cython cythonize cygdb ; do
|
||||||
mv %{buildroot}%{_bindir}/$p %{buildroot}%{_bindir}/$p-%{py_ver}
|
mv %{buildroot}%{_bindir}/$p %{buildroot}%{_bindir}/$p-%{py_ver}
|
||||||
ln -s %{_bindir}/$p-%{py_ver} %{buildroot}%{_bindir}/$p
|
ln -s -f %{_sysconfdir}/alternatives/$p %{buildroot}%{_bindir}/$p
|
||||||
ln -s %{_bindir}/$p-%{py_ver} %{buildroot}%{_sysconfdir}/alternatives/$p
|
# create a dummy target for /etc/alternatives/$p
|
||||||
|
touch %{buildroot}%{_sysconfdir}/alternatives/$p
|
||||||
done
|
done
|
||||||
|
|
||||||
%fdupes -s %{buildroot}%{python_sitearch} %{buildroot}%{_docdir}
|
%fdupes -s %{buildroot}%{python_sitearch} %{buildroot}%{_docdir}
|
||||||
rm -rf %{buildroot}%{python_sitearch}/__pycache__/
|
rm -rf %{buildroot}%{python_sitearch}/__pycache__/
|
||||||
# avoid conflicts with python 2 version
|
|
||||||
|
|
||||||
%check
|
|
||||||
python runtests.py -vv
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%_sbindir/update-alternatives \
|
%_sbindir/update-alternatives \
|
||||||
@ -89,17 +85,20 @@ python runtests.py -vv
|
|||||||
--slave %{_bindir}/cythonize cythonize %{_bindir}/cythonize-%{py_ver} \
|
--slave %{_bindir}/cythonize cythonize %{_bindir}/cythonize-%{py_ver} \
|
||||||
--slave %{_bindir}/cygdb cygdb %{_bindir}/cygdb-%{py_ver}
|
--slave %{_bindir}/cygdb cygdb %{_bindir}/cygdb-%{py_ver}
|
||||||
|
|
||||||
%preun
|
%postun
|
||||||
if [ $1 -eq 0 ] ; then
|
if [ $1 -eq 0 ] ; then
|
||||||
%_sbindir/update-alternatives --remove cython %{_bindir}/cython-%{py_ver}
|
%_sbindir/update-alternatives --remove cython %{_bindir}/cython-%{py_ver}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
%check
|
||||||
|
python runtests.py -vv
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc COPYING.txt LICENSE.txt README.txt ToDo.txt USAGE.txt Doc Demos
|
%doc COPYING.txt LICENSE.txt README.txt ToDo.txt USAGE.txt Doc Demos
|
||||||
%ghost %{_bindir}/cygdb
|
%{_bindir}/cygdb
|
||||||
%ghost %{_bindir}/cython
|
%{_bindir}/cython
|
||||||
%ghost %{_bindir}/cythonize
|
%{_bindir}/cythonize
|
||||||
%{_bindir}/cygdb-%{py_ver}
|
%{_bindir}/cygdb-%{py_ver}
|
||||||
%{_bindir}/cython-%{py_ver}
|
%{_bindir}/cython-%{py_ver}
|
||||||
%{_bindir}/cythonize-%{py_ver}
|
%{_bindir}/cythonize-%{py_ver}
|
||||||
@ -107,7 +106,7 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/cython
|
%ghost %{_sysconfdir}/alternatives/cython
|
||||||
%ghost %{_sysconfdir}/alternatives/cythonize
|
%ghost %{_sysconfdir}/alternatives/cythonize
|
||||||
%{python_sitearch}/Cython/
|
%{python_sitearch}/Cython/
|
||||||
%{python_sitearch}/Cython-%{version}-py%{py_ver}.egg-info
|
%{python_sitearch}/Cython-%{version}-py*.egg-info
|
||||||
%{python_sitearch}/cython.py*
|
%{python_sitearch}/cython.py*
|
||||||
%{python_sitearch}/pyximport/
|
%{python_sitearch}/pyximport/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user