From 194fb361b085d78cd385d17403ae586cc7c23d2d Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Thu, 1 Aug 2019 14:40:15 -0400 Subject: [PATCH] import Cython-0.28.1-7.module+el8.1.0+3111+de3f2d8e --- .Cython.metadata | 1 + .gitignore | 1 + .../replace-gcc-attribute-os-with-cold.patch | 13 ++ SPECS/Cython.spec | 137 ++++++++++++++++++ 4 files changed, 152 insertions(+) create mode 100644 .Cython.metadata create mode 100644 .gitignore create mode 100644 SOURCES/replace-gcc-attribute-os-with-cold.patch create mode 100644 SPECS/Cython.spec diff --git a/.Cython.metadata b/.Cython.metadata new file mode 100644 index 0000000..40fba71 --- /dev/null +++ b/.Cython.metadata @@ -0,0 +1 @@ +85d6abc9cded209bfa0e21f0f6876018e6125056 SOURCES/Cython-0.28.1.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..04f393f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/Cython-0.28.1.tar.gz diff --git a/SOURCES/replace-gcc-attribute-os-with-cold.patch b/SOURCES/replace-gcc-attribute-os-with-cold.patch new file mode 100644 index 0000000..ec2bb41 --- /dev/null +++ b/SOURCES/replace-gcc-attribute-os-with-cold.patch @@ -0,0 +1,13 @@ +diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c +index 2aeabd2..8b285bb 100644 +--- a/Cython/Utility/ModuleSetupCode.c ++++ b/Cython/Utility/ModuleSetupCode.c +@@ -669,7 +669,7 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { + #if defined(__clang__) + #define CYTHON_SMALL_CODE + #elif defined(__GNUC__) +- #define CYTHON_SMALL_CODE __attribute__((optimize("Os"))) ++ #define CYTHON_SMALL_CODE __attribute__((cold)) + #else + #define CYTHON_SMALL_CODE + #endif diff --git a/SPECS/Cython.spec b/SPECS/Cython.spec new file mode 100644 index 0000000..7cfa111 --- /dev/null +++ b/SPECS/Cython.spec @@ -0,0 +1,137 @@ +# python2X and python3X are built form the same module, so we need a conditional +# for python[23] bits the state of the conditional is not important in the spec, +# it is set in modulemd +%bcond_without python2 +%bcond_without python3 + +%global srcname Cython +%global upname cython + +Name: Cython +Version: 0.28.1 +Release: 7%{?dist} +Summary: Language for writing Python extension modules + +License: ASL 2.0 +URL: http://www.cython.org +Source: https://github.com/cython/cython/archive/%{version}/%{srcname}-%{version}.tar.gz + +# Replace GCC's attribute optimize("Os") by the better supported and similar (cold). +# We essentially disable again strict aliasing which makes some compiler warnings +# go away on python2. +# Fixed upstream: https://github.com/cython/cython/commit/9ddac7152091eac62830fea4f38b4d7f9edb6a86 +Patch0: replace-gcc-attribute-os-with-cold.patch + +BuildRequires: gcc + +%global _description \ +This is a development version of Pyrex, a language\ +for writing Python extension modules. + +%description %{_description} + +%if %{with python2} +%package -n python2-%{srcname} +Summary: %{summary} +%{?python_provide:%python_provide python2-%{srcname}} +Obsoletes: Cython < 0.28.1-5 +BuildRequires: python2-devel +BuildRequires: python2-setuptools + + +%description -n python2-%{srcname} %{_description} + +Python 2 version. + +%endif + +%if %{with python3} +%package -n python3-%{srcname} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{srcname}} +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +%description -n python3-%{srcname} %{_description} + +Python 3 version. + +%endif + +%prep +%autosetup -n %{upname}-%{version} -p1 + +%build +%{?with_python2:%py2_build} +%{?with_python3:%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). +%if %{with python3} +%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 +%endif + +%if %{with python2} +%py2_install +for bin in cython cythonize cygdb; do + mv %{buildroot}%{_bindir}/${bin} %{buildroot}%{_bindir}/${bin}-%{python2_version} + ln -s ${bin}-%{python2_version} $RPM_BUILD_ROOT%{_bindir}/${bin}-2 +done +rm -rf %{buildroot}%{python2_sitelib}/setuptools/tests +%endif + +%if %{with python2} +%files -n python2-%{srcname} +%license LICENSE.txt +%doc *.txt Demos Doc Tools +%{_bindir}/cython-2 +%{_bindir}/cygdb-2 +%{_bindir}/cythonize-2 +%{_bindir}/cython-%{python2_version} +%{_bindir}/cygdb-%{python2_version} +%{_bindir}/cythonize-%{python2_version} +%{python2_sitearch}/%{srcname}-*.egg-info/ +%{python2_sitearch}/%{srcname}/ +%{python2_sitearch}/pyximport/ +%{python2_sitearch}/%{upname}.py* +%endif + +%if %{with python3} +%files -n python3-%{srcname} +%license LICENSE.txt +%doc *.txt Demos Doc Tools +%{_bindir}/cython3 +%{_bindir}/cythonize3 +%{_bindir}/cygdb3 +%{python3_sitearch}/%{srcname}-*.egg-info/ +%{python3_sitearch}/%{srcname}/ +%{python3_sitearch}/pyximport/ +%{python3_sitearch}/%{upname}.py +%{python3_sitearch}/__pycache__/%{upname}.* +%endif + +%changelog +* Wed Apr 03 2019 Tomas Orsava - 0.28.1-7 +- Bumping due to problems with modular RPM upgrade path +- Resolves: rhbz#1695587 + +* Wed Dec 12 2018 Charalampos Stratakis - 0.28.1-6 +- Replace GCC's attribute optimize("Os") by the better supported and similar (cold). +- Resolves: rhbz#1658621 + +* Tue Oct 09 2018 Lumír Balhar - 0.28.1-5 +- Remove unversioned provides +- Resolves: rhbz#1628242 + +* Wed Aug 08 2018 Lumír Balhar - 0.28.1-4 +- Remove unversioned binaries from python2 subpackage +- Resolves: rhbz#1613343 + +* Wed Aug 01 2018 Lumír Balhar - 0.28.1-3 +- First version for python27 module