diff --git a/.abf.yml b/.abf.yml index f83cc93..406c0fc 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,2 +1,2 @@ sources: - cython-3.0.2.tar.gz: 148e629f998e7908222649b957cb52e144bafe98 + cython-3.0.4.tar.gz: abf732e561637585845ca32099e5c11cce08f636 diff --git a/python-cython.spec b/python-cython.spec index 7296573..a1e0953 100644 --- a/python-cython.spec +++ b/python-cython.spec @@ -6,14 +6,16 @@ %global optflags %optflags -O3 +%define python38 /usr/libexec/python3.8 + Summary: Language for writing C extensions to Python Name: python-cython -Version: 3.0.2 +Version: 3.0.4 Release: 1 License: Python Group: Development/Python -Url: http://www.cython.org -Source0: https://github.com/cython/cython/archive/%{version}.tar.gz?/cython-%{version}.tar.gz +URL: https://cython.org +Source0: https://github.com/cython/cython/archive/%{version}/%{tarname}-%{version}.tar.gz Source1: %{name}.rpmlintrc Patch0: cython-0.29.28-missing-header.patch BuildRequires: dos2unix @@ -42,33 +44,102 @@ the Python language. It is based on Pyrex, but provides more cutting edge functionality and optimizations. %files -n python3-cython -%{_bindir}/cython -%{_bindir}/cythonize -%{_bindir}/cygdb +%{_bindir}/cython3 +%{_bindir}/cythonize3 +%{_bindir}/cygdb3 %{py3_platsitedir}/Cython %{py3_platsitedir}/Cython-%{version}-*.egg-info %{py3_platsitedir}/cython* %{py3_platsitedir}/pyximport -%{py3_platsitedir}/__pycache__/ +#{py3_platsitedir}/__pycache__/ + +#-------------------------------------------------------------------- + +%package -n python38-cython +Summary: Language for writing C extensions to Python +Group: Development/Python +BuildRequires: python38-devel +BuildRequires: python38-setuptools +Provides: python-cython = %{version}-%{release} + +%description -n python38-cython +Cython is a language that facilitates the writing of C extensions for +the Python language. It is based on Pyrex, but provides more cutting +edge functionality and optimizations. + +%files -n python38-cython +%{_bindir}/cython38 +%{_bindir}/cythonize38 +%{_bindir}/cygdb38 +%{py38_platsitedir}/Cython +%{py38_platsitedir}/Cython-%{version}-*.egg-info +%{py38_platsitedir}/cython* +%{py38_platsitedir}/pyximport +#{py38_platsitedir}/__pycache__/ #-------------------------------------------------------------------- %prep -%autosetup -p1 -n %{tarname}-%{version} +%setup -qn %{tarname}-%{version} +#patch0 -p1 find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' +cp -r . %{py38dir} +cp -r . %{py3dir} + %build -%setup_compile_flags -CFLAGS="%{optflags}" %{__python3} setup.py build +%py2_build + +pushd %{py3dir} +%py3_build +popd + +pushd %{py38dir} +%py38_build +popd %install -%{__python3} setup.py install -O1 --skip-build --root %{buildroot} -rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests -rm -rf %{buildroot}/%{python3_sitearch}/__pycache__/ +#{__python3} setup.py install -O1 --skip-build --root %{buildroot} +#rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests +#rm -rf %{buildroot}/%{python3_sitearch}/__pycache__/ + +%py_install +pushd %{buildroot}%{_bindir} +mv cygdb cygdb2 +mv cython cython2 +mv cythonize cythonize2 +popd + +pushd %{py3dir} +%py3_install +pushd %{buildroot}%{_bindir} +mv cygdb cygdb3 +mv cython cython3 +mv cythonize cythonize3 +popd +popd + +pushd %{py38dir} +%py38_install +pushd %{buildroot}%{_bindir} +mv cygdb cygdb38 +mv cython cython38 +mv cythonize cythonize38 +popd +popd %if %{with check} %check python3 runtests.py - +%{python38} runtests.py %endif + +%files +%{_bindir}/cython2 +%{_bindir}/cythonize2 +%{_bindir}/cygdb2 +%{py_platsitedir}/Cython +%{py_platsitedir}/Cython-%{version}-*.egg-info +%{py_platsitedir}/cython* +%{py_platsitedir}/pyximport