|
|
47185ae |
%bcond tests 1
|
|
|
0229f27 |
|
|
|
7056330 |
# This bcond allows to ship a non-compiled version
|
|
|
7056330 |
# Slower, but sometimes necessary with alpha Python versions
|
|
|
e08af6d |
%bcond cython_compile 1
|
|
|
7056330 |
|
|
|
c64ba52 |
Name: Cython
|
|
|
0e9ba50 |
Version: 3.0.9
|
|
|
f800157 |
Release: %autorelease
|
|
|
890ccc7 |
Summary: Language for writing Python extension modules
|
|
|
0229f27 |
|
|
|
d55635f |
License: Apache-2.0
|
|
|
c64ba52 |
URL: http://www.cython.org
|
|
|
d2e6364 |
Source: https://github.com/cython/cython/archive/%{version}/Cython-%{version}.tar.gz
|
|
|
c6b945e |
|
|
|
abebf57 |
BuildRequires: python3-devel
|
|
|
abebf57 |
|
|
|
abebf57 |
%if %{with tests}
|
|
|
abebf57 |
BuildRequires: gcc-c++
|
|
|
816bc6d |
BuildRequires: gdb
|
|
|
816bc6d |
# optionally uses Python's test.support for some test
|
|
|
816bc6d |
BuildRequires: python3-test
|
|
|
5907573 |
# the Python tests requirements are curated manually
|
|
|
5907573 |
# the test-requirements*.txt files mix in coverage and optional deps
|
|
|
abebf57 |
BuildRequires: python3-numpy
|
|
|
87851c9 |
%if %{undefined rhel}
|
|
|
d0c963e |
# We don't want to pull in the following deps to RHEL just to run more tests.
|
|
|
d0c963e |
# The tests use IPython.testing.globalipapp:
|
|
|
816bc6d |
BuildRequires: python3-ipython+test
|
|
|
d0c963e |
BuildRequires: python3-pythran
|
|
|
5cc48f1 |
# The tests requiring jedi are optional and skipped when jedi is not installed.
|
|
|
5cc48f1 |
# Note that the jedi tests were forcefully disabled a long time ago,
|
|
|
5cc48f1 |
# in https://github.com/cython/cython/issues/1845 far, far away.
|
|
|
5cc48f1 |
# We keep the dependency here so we don't forget to re-add it once the balance is restored.
|
|
|
abebf57 |
BuildRequires: python3-jedi
|
|
|
abebf57 |
%endif
|
|
|
5cc48f1 |
%endif
|
|
|
5f0bd3a |
|
|
|
7056330 |
%if %{with cython_compile}
|
|
|
c64ba52 |
BuildRequires: gcc
|
|
|
7056330 |
%else
|
|
|
7056330 |
BuildArch: noarch
|
|
|
7056330 |
%endif
|
|
|
7056330 |
|
|
|
abebf57 |
%global _description %{expand:
|
|
|
abebf57 |
The Cython language makes writing C extensions for the Python language as easy
|
|
|
abebf57 |
as Python itself. Cython is a source code translator based on Pyrex,
|
|
|
abebf57 |
but supports more cutting edge functionality and optimizations.
|
|
|
abebf57 |
|
|
|
abebf57 |
The Cython language is a superset of the Python language (almost all Python
|
|
|
abebf57 |
code is also valid Cython code), but Cython additionally supports optional
|
|
|
abebf57 |
static typing to natively call C functions, operate with C++ classes and
|
|
|
abebf57 |
declare fast C types on variables and class attributes.
|
|
|
abebf57 |
This allows the compiler to generate very efficient C code from Cython code.
|
|
Orion Poplawski |
94f8345 |
|
|
|
abebf57 |
This makes Cython the ideal language for writing glue code for external C/C++
|
|
|
abebf57 |
libraries, and for fast C modules that speed up the execution of Python code.}
|
|
|
0229f27 |
|
|
|
e72d1ab |
%description %{_description}
|
|
|
0229f27 |
|
|
|
abebf57 |
|
|
|
1492629 |
%package -n python3-cython
|
|
|
c64ba52 |
Summary: %{summary}
|
|
|
d8e77b0 |
Provides: Cython = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
d8e77b0 |
Provides: Cython%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
abebf57 |
Provides: cython = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
abebf57 |
Provides: cython%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
1492629 |
%py_provides python3-Cython
|
|
|
1492629 |
Obsoletes: python3-Cython < 3~~
|
|
|
3c0f2bf |
|
|
|
d658964 |
# A small templating library is bundled in Cython/Tempita
|
|
|
d658964 |
# Upstream version 0.5.2 is available from https://pypi.org/project/Tempita
|
|
|
d658964 |
# but the bundled copy is patched and reorganized.
|
|
|
d658964 |
# Upstream homepage is inaccessible.
|
|
|
d658964 |
Provides: bundled(python3dist(tempita))
|
|
|
d658964 |
|
|
|
1492629 |
%description -n python3-cython %{_description}
|
|
|
3c0f2bf |
|
|
|
0229f27 |
|
|
|
0229f27 |
%prep
|
|
|
d2e6364 |
%autosetup -n cython-%{version} -p1
|
|
|
abebf57 |
|
|
|
0229f27 |
|
|
|
5907573 |
%generate_buildrequires
|
|
|
5907573 |
%pyproject_buildrequires
|
|
|
5907573 |
|
|
|
5907573 |
|
|
|
0229f27 |
%build
|
|
|
5907573 |
%pyproject_wheel %{!?with_cython_compile:-C--global-option=--no-cython-compile}
|
|
|
0229f27 |
|
|
|
9c7f46b |
|
|
|
0229f27 |
%install
|
|
|
5907573 |
%pyproject_install
|
|
|
5907573 |
%pyproject_save_files Cython cython pyximport
|
|
|
3c0f2bf |
|
|
|
0229f27 |
|
|
|
7763f44 |
%if %{with tests}
|
|
|
7763f44 |
%check
|
|
|
1f32e41 |
# run.pstats_profile_test* fails on Python 3.12
|
|
|
7b55261 |
# https://github.com/cython/cython/issues/5470
|
|
|
2323ac7 |
# run.parallel fails on i686
|
|
|
2323ac7 |
# https://github.com/cython/cython/issues/2807
|
|
|
7763f44 |
%{python3} runtests.py -vv --no-pyregr %{?_smp_mflags} \
|
|
|
1f32e41 |
--exclude 'run.pstats_profile_test*' \
|
|
|
7763f44 |
%ifarch %{ix86}
|
|
|
2323ac7 |
--exclude run.parallel \
|
|
|
7763f44 |
%endif
|
|
|
7763f44 |
|
|
|
7763f44 |
%endif
|
|
|
0229f27 |
|
|
|
abebf57 |
|
|
|
5907573 |
%files -n python3-cython -f %{pyproject_files}
|
|
|
3c0f2bf |
%doc *.txt Demos Doc Tools
|
|
|
89f353e |
%{_bindir}/cython
|
|
|
89f353e |
%{_bindir}/cygdb
|
|
|
89f353e |
%{_bindir}/cythonize
|
|
|
0229f27 |
|
|
|
abebf57 |
|
|
|
0229f27 |
%changelog
|
|
|
f800157 |
%autochangelog
|