2020-02-09 21:20:48 +00:00
|
|
|
# Python module not linking to libpython
|
|
|
|
%global _disable_ld_no_undefined 1
|
|
|
|
|
|
|
|
%bcond_with check
|
2017-03-09 22:30:16 -05:00
|
|
|
%define tarname cython
|
2015-01-27 15:22:51 +03:00
|
|
|
|
2020-02-09 21:20:48 +00:00
|
|
|
%global optflags %optflags -O3
|
2012-02-01 14:24:13 +04:00
|
|
|
|
2020-02-09 21:20:48 +00:00
|
|
|
Summary: Language for writing C extensions to Python
|
|
|
|
Name: python-cython
|
2023-08-29 18:17:58 +00:00
|
|
|
Version: 3.0.2
|
2023-07-27 14:27:35 +09:00
|
|
|
Release: 1
|
2020-02-09 21:20:48 +00:00
|
|
|
License: Python
|
|
|
|
Group: Development/Python
|
|
|
|
Url: http://www.cython.org
|
2020-10-27 21:38:05 +09:00
|
|
|
Source0: https://github.com/cython/cython/archive/%{version}.tar.gz?/cython-%{version}.tar.gz
|
2020-02-09 21:20:48 +00:00
|
|
|
Source1: %{name}.rpmlintrc
|
2023-04-09 12:13:32 +00:00
|
|
|
Patch0: cython-0.29.28-missing-header.patch
|
2020-02-09 21:20:48 +00:00
|
|
|
BuildRequires: dos2unix
|
|
|
|
%if %{with check}
|
|
|
|
BuildRequires: gdb
|
|
|
|
BuildRequires: gomp-devel
|
2023-07-27 16:15:48 +09:00
|
|
|
BuildRequires: python3-numpy-devel
|
2014-12-12 13:40:11 +04:00
|
|
|
%endif
|
2012-02-01 14:24:13 +04:00
|
|
|
|
|
|
|
%description
|
|
|
|
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.
|
|
|
|
|
2020-10-27 21:38:05 +09:00
|
|
|
#--------------------------------------------------------------------
|
2013-03-28 16:43:26 +04:00
|
|
|
%package -n python3-cython
|
2020-02-09 21:20:48 +00:00
|
|
|
Summary: Language for writing C extensions to Python
|
|
|
|
Group: Development/Python
|
|
|
|
BuildRequires: pkgconfig(python3)
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
Provides: python-cython = %{version}-%{release}
|
2013-03-28 16:43:26 +04:00
|
|
|
|
|
|
|
%description -n python3-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.
|
2020-02-09 21:20:48 +00:00
|
|
|
|
2020-10-27 21:38:05 +09:00
|
|
|
%files -n python3-cython
|
|
|
|
%{_bindir}/cython
|
|
|
|
%{_bindir}/cythonize
|
|
|
|
%{_bindir}/cygdb
|
|
|
|
%{py3_platsitedir}/Cython
|
|
|
|
%{py3_platsitedir}/Cython-%{version}-*.egg-info
|
|
|
|
%{py3_platsitedir}/cython*
|
|
|
|
%{py3_platsitedir}/pyximport
|
2023-04-09 12:13:32 +00:00
|
|
|
%{py3_platsitedir}/__pycache__/
|
2020-10-27 21:38:05 +09:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
|
2012-02-01 14:24:13 +04:00
|
|
|
%prep
|
2020-02-09 21:20:48 +00:00
|
|
|
%autosetup -p1 -n %{tarname}-%{version}
|
2012-02-01 14:24:13 +04:00
|
|
|
|
2023-07-27 16:15:48 +09:00
|
|
|
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
2013-03-28 16:43:26 +04:00
|
|
|
|
2017-03-09 22:30:16 -05:00
|
|
|
%build
|
2020-02-09 21:20:48 +00:00
|
|
|
%setup_compile_flags
|
|
|
|
CFLAGS="%{optflags}" %{__python3} setup.py build
|
2021-09-18 22:04:27 +09:00
|
|
|
|
2012-02-01 14:24:13 +04:00
|
|
|
%install
|
2020-02-09 21:20:48 +00:00
|
|
|
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
|
|
|
rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests
|
|
|
|
rm -rf %{buildroot}/%{python3_sitearch}/__pycache__/
|
|
|
|
|
|
|
|
%if %{with check}
|
|
|
|
%check
|
2023-07-27 16:15:48 +09:00
|
|
|
python3 runtests.py
|
2021-09-18 22:04:27 +09:00
|
|
|
|
2020-02-09 21:20:48 +00:00
|
|
|
%endif
|