Only have one /usr/bin/cython
According to the current packaging guidelines, if the functionality of the executable is the same regardless of the Python version, the executable should be shipped by Python 3 package only. This is the case for Cython.
This commit is contained in:
parent
80d0ce6204
commit
89f353e21a
29
Cython.spec
29
Cython.spec
@ -6,7 +6,7 @@
|
||||
|
||||
Name: Cython
|
||||
Version: 0.28.4
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Language for writing Python extension modules
|
||||
|
||||
License: ASL 2.0
|
||||
@ -45,6 +45,7 @@ Python 2 version.
|
||||
%package -n python3-%{srcname}
|
||||
Summary: %{summary}
|
||||
%{?python_provide:%python_provide python3-%{srcname}}
|
||||
Conflicts: python2-%{srcname} < 0.28.4-2
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
%if %{with tests}
|
||||
@ -65,17 +66,13 @@ Python 3 version.
|
||||
%py3_build
|
||||
|
||||
%install
|
||||
# Must do the python3 install first because the scripts in /usr/bin are
|
||||
# overwritten with every setup.py install (and we want the python2 version
|
||||
# to be the default for now).
|
||||
%py3_install
|
||||
for bin in cython cythonize cygdb; do
|
||||
mv %{buildroot}%{_bindir}/${bin} %{buildroot}%{_bindir}/${bin}3
|
||||
done
|
||||
rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests
|
||||
|
||||
%py2_install
|
||||
rm -rf %{buildroot}%{python2_sitelib}/setuptools/tests
|
||||
rm %{buildroot}%{_bindir}/*
|
||||
|
||||
%py3_install
|
||||
rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests
|
||||
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
@ -86,9 +83,6 @@ rm -rf %{buildroot}%{python2_sitelib}/setuptools/tests
|
||||
%files -n python2-%{srcname}
|
||||
%license LICENSE.txt
|
||||
%doc *.txt Demos Doc Tools
|
||||
%{_bindir}/cython
|
||||
%{_bindir}/cygdb
|
||||
%{_bindir}/cythonize
|
||||
%{python2_sitearch}/%{srcname}-*.egg-info/
|
||||
%{python2_sitearch}/%{srcname}/
|
||||
%{python2_sitearch}/pyximport/
|
||||
@ -97,9 +91,9 @@ rm -rf %{buildroot}%{python2_sitelib}/setuptools/tests
|
||||
%files -n python3-%{srcname}
|
||||
%license LICENSE.txt
|
||||
%doc *.txt Demos Doc Tools
|
||||
%{_bindir}/cython3
|
||||
%{_bindir}/cythonize3
|
||||
%{_bindir}/cygdb3
|
||||
%{_bindir}/cython
|
||||
%{_bindir}/cygdb
|
||||
%{_bindir}/cythonize
|
||||
%{python3_sitearch}/%{srcname}-*.egg-info/
|
||||
%{python3_sitearch}/%{srcname}/
|
||||
%{python3_sitearch}/pyximport/
|
||||
@ -107,6 +101,9 @@ rm -rf %{buildroot}%{python2_sitelib}/setuptools/tests
|
||||
%{python3_sitearch}/__pycache__/%{upname}.*
|
||||
|
||||
%changelog
|
||||
* Sun Aug 05 2018 Miro Hrončok <mhroncok@redhat.com> - 0.28.4-2
|
||||
- Only have one /usr/bin/cython
|
||||
|
||||
* Sun Jul 15 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.28.4-1
|
||||
- Update to 0.28.4
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user