mirror of
https://abf.rosa.ru/djam/python-cython.git
synced 2025-02-23 22:02:47 +00:00
74 lines
2 KiB
RPMSpec
74 lines
2 KiB
RPMSpec
# Python module not linking to libpython
|
|
%global _disable_ld_no_undefined 1
|
|
|
|
%bcond_with check
|
|
%define tarname cython
|
|
|
|
%global optflags %optflags -O3
|
|
|
|
Summary: Language for writing C extensions to Python
|
|
Name: python-cython
|
|
Version: 3.0.2
|
|
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
|
|
Source1: %{name}.rpmlintrc
|
|
Patch0: cython-0.29.28-missing-header.patch
|
|
BuildRequires: dos2unix
|
|
%if %{with check}
|
|
BuildRequires: gdb
|
|
BuildRequires: gomp-devel
|
|
BuildRequires: python3-numpy-devel
|
|
%endif
|
|
|
|
%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.
|
|
|
|
#--------------------------------------------------------------------
|
|
%package -n python3-cython
|
|
Summary: Language for writing C extensions to Python
|
|
Group: Development/Python
|
|
BuildRequires: pkgconfig(python3)
|
|
BuildRequires: python3-setuptools
|
|
Provides: python-cython = %{version}-%{release}
|
|
|
|
%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.
|
|
|
|
%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
|
|
%{py3_platsitedir}/__pycache__/
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
%prep
|
|
%autosetup -p1 -n %{tarname}-%{version}
|
|
|
|
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
|
|
|
%build
|
|
%setup_compile_flags
|
|
CFLAGS="%{optflags}" %{__python3} setup.py build
|
|
|
|
%install
|
|
%{__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
|
|
python3 runtests.py
|
|
|
|
%endif
|