Convert to pyproject-rpm-macros

This commit is contained in:
Miro Hrončok 2023-10-13 14:56:47 +02:00
parent 86fdd7be24
commit 5907573e25
1 changed files with 10 additions and 11 deletions

View File

@ -14,13 +14,14 @@ URL: http://www.cython.org
Source: https://github.com/cython/cython/archive/%{version}/Cython-%{version}.tar.gz
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%if %{with tests}
BuildRequires: gcc-c++
BuildRequires: gdb
# optionally uses Python's test.support for some test
BuildRequires: python3-test
# the Python tests requirements are curated manually
# the test-requirements*.txt files mix in coverage and optional deps
BuildRequires: python3-numpy
BuildRequires: python3-pythran
%if %{undefined rhel}
@ -38,10 +39,8 @@ BuildRequires: python3-jedi
%if %{with cython_compile}
BuildRequires: gcc
%global python3_site %{python3_sitearch}
%else
BuildArch: noarch
%global python3_site %{python3_sitelib}
%endif
%global _description %{expand:
@ -83,12 +82,17 @@ Provides: bundled(python3dist(tempita))
%autosetup -n cython-%{version} -p1
%generate_buildrequires
%pyproject_buildrequires
%build
%py3_build -- %{!?with_cython_compile:--no-cython-compile}
%pyproject_wheel %{!?with_cython_compile:-C--global-option=--no-cython-compile}
%install
%py3_install -- %{!?with_cython_compile:--no-cython-compile}
%pyproject_install
%pyproject_save_files Cython cython pyximport
%if %{with tests}
@ -106,16 +110,11 @@ Provides: bundled(python3dist(tempita))
%endif
%files -n python3-cython
%license LICENSE.txt
%files -n python3-cython -f %{pyproject_files}
%doc *.txt Demos Doc Tools
%{_bindir}/cython
%{_bindir}/cygdb
%{_bindir}/cythonize
%{python3_site}/Cython-*.egg-info/
%{python3_site}/Cython/
%{python3_site}/pyximport/
%pycached %{python3_site}/cython.py
%changelog