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
|
Name: Cython
|
||||||
Version: 0.28.4
|
Version: 0.28.4
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Language for writing Python extension modules
|
Summary: Language for writing Python extension modules
|
||||||
|
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
@ -45,6 +45,7 @@ Python 2 version.
|
|||||||
%package -n python3-%{srcname}
|
%package -n python3-%{srcname}
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
%{?python_provide:%python_provide python3-%{srcname}}
|
%{?python_provide:%python_provide python3-%{srcname}}
|
||||||
|
Conflicts: python2-%{srcname} < 0.28.4-2
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
@ -65,17 +66,13 @@ Python 3 version.
|
|||||||
%py3_build
|
%py3_build
|
||||||
|
|
||||||
%install
|
%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
|
%py2_install
|
||||||
rm -rf %{buildroot}%{python2_sitelib}/setuptools/tests
|
rm -rf %{buildroot}%{python2_sitelib}/setuptools/tests
|
||||||
|
rm %{buildroot}%{_bindir}/*
|
||||||
|
|
||||||
|
%py3_install
|
||||||
|
rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests
|
||||||
|
|
||||||
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
%check
|
%check
|
||||||
@ -86,9 +83,6 @@ rm -rf %{buildroot}%{python2_sitelib}/setuptools/tests
|
|||||||
%files -n python2-%{srcname}
|
%files -n python2-%{srcname}
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc *.txt Demos Doc Tools
|
%doc *.txt Demos Doc Tools
|
||||||
%{_bindir}/cython
|
|
||||||
%{_bindir}/cygdb
|
|
||||||
%{_bindir}/cythonize
|
|
||||||
%{python2_sitearch}/%{srcname}-*.egg-info/
|
%{python2_sitearch}/%{srcname}-*.egg-info/
|
||||||
%{python2_sitearch}/%{srcname}/
|
%{python2_sitearch}/%{srcname}/
|
||||||
%{python2_sitearch}/pyximport/
|
%{python2_sitearch}/pyximport/
|
||||||
@ -97,9 +91,9 @@ rm -rf %{buildroot}%{python2_sitelib}/setuptools/tests
|
|||||||
%files -n python3-%{srcname}
|
%files -n python3-%{srcname}
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc *.txt Demos Doc Tools
|
%doc *.txt Demos Doc Tools
|
||||||
%{_bindir}/cython3
|
%{_bindir}/cython
|
||||||
%{_bindir}/cythonize3
|
%{_bindir}/cygdb
|
||||||
%{_bindir}/cygdb3
|
%{_bindir}/cythonize
|
||||||
%{python3_sitearch}/%{srcname}-*.egg-info/
|
%{python3_sitearch}/%{srcname}-*.egg-info/
|
||||||
%{python3_sitearch}/%{srcname}/
|
%{python3_sitearch}/%{srcname}/
|
||||||
%{python3_sitearch}/pyximport/
|
%{python3_sitearch}/pyximport/
|
||||||
@ -107,6 +101,9 @@ rm -rf %{buildroot}%{python2_sitelib}/setuptools/tests
|
|||||||
%{python3_sitearch}/__pycache__/%{upname}.*
|
%{python3_sitearch}/__pycache__/%{upname}.*
|
||||||
|
|
||||||
%changelog
|
%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
|
* Sun Jul 15 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.28.4-1
|
||||||
- Update to 0.28.4
|
- Update to 0.28.4
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user