Blame SPECS/python3.11-Cython.spec

0bfe6c
%global __python3 /usr/bin/python3.11
0bfe6c
%global python3_pkgversion 3.11
0bfe6c
0bfe6c
# RHEL: Tests disabled during build due to missing dependencies
0bfe6c
%bcond_with tests
0bfe6c
0bfe6c
# This bcond allows to ship a non-compiled version
0bfe6c
# Slower, but sometimes necessary with alpha Python versions
0bfe6c
%bcond_without cython_compile
0bfe6c
0bfe6c
Name:           python%{python3_pkgversion}-Cython
0bfe6c
Version:        0.29.32
0bfe6c
Release:        2%{?dist}
0bfe6c
Summary:        Language for writing Python extension modules
0bfe6c
0bfe6c
License:        ASL 2.0
0bfe6c
URL:            http://www.cython.org
0bfe6c
Source:         https://github.com/cython/cython/archive/%{version}/Cython-%{version}.tar.gz
0bfe6c
0bfe6c
BuildRequires:  python%{python3_pkgversion}-devel
0bfe6c
BuildRequires:  python%{python3_pkgversion}-rpm-macros
0bfe6c
BuildRequires:  python%{python3_pkgversion}-setuptools
0bfe6c
0bfe6c
%if %{with tests}
0bfe6c
BuildRequires:  gcc-c++
0bfe6c
BuildRequires:  python%{python3_pkgversion}-numpy
0bfe6c
BuildRequires:  python%{python3_pkgversion}-jedi
0bfe6c
%endif
0bfe6c
0bfe6c
%if %{with cython_compile}
0bfe6c
BuildRequires:  gcc
0bfe6c
%global python3_site %{python3_sitearch}
0bfe6c
%else
0bfe6c
BuildArch:      noarch
0bfe6c
%global python3_site %{python3_sitelib}
0bfe6c
%endif
0bfe6c
0bfe6c
%py_provides    python%{python3_pkgversion}-cython
0bfe6c
0bfe6c
# A small templating library is bundled in Cython/Tempita
0bfe6c
# Upstream version 0.5.2 is available from https://pypi.org/project/Tempita
0bfe6c
# but the bundled copy is patched and reorganized.
0bfe6c
# Upstream homepage is inaccessible.
0bfe6c
Provides:       bundled(python%{python3_pkgversion}dist(tempita))
0bfe6c
0bfe6c
%global _description %{expand:
0bfe6c
The Cython language makes writing C extensions for the Python language as easy
0bfe6c
as Python itself. Cython is a source code translator based on Pyrex,
0bfe6c
but supports more cutting edge functionality and optimizations.
0bfe6c
0bfe6c
The Cython language is a superset of the Python language (almost all Python
0bfe6c
code is also valid Cython code), but Cython additionally supports optional
0bfe6c
static typing to natively call C functions, operate with C++ classes and
0bfe6c
declare fast C types on variables and class attributes.
0bfe6c
This allows the compiler to generate very efficient C code from Cython code.
0bfe6c
0bfe6c
This makes Cython the ideal language for writing glue code for external C/C++
0bfe6c
libraries, and for fast C modules that speed up the execution of Python code.}
0bfe6c
0bfe6c
%description %{_description}
0bfe6c
0bfe6c
%prep
0bfe6c
%autosetup -n cython-%{version} -p1
0bfe6c
0bfe6c
0bfe6c
%build
0bfe6c
%py3_build -- %{!?with_cython_compile:--no-cython-compile}
0bfe6c
0bfe6c
%install
0bfe6c
%py3_install -- %{!?with_cython_compile:--no-cython-compile}
0bfe6c
0bfe6c
# Rename unversioned binaries
0bfe6c
mv %{buildroot}%{_bindir}/cython{,-%{python3_version}}
0bfe6c
mv %{buildroot}%{_bindir}/cygdb{,-%{python3_version}}
0bfe6c
mv %{buildroot}%{_bindir}/cythonize{,-%{python3_version}}
0bfe6c
0bfe6c
0bfe6c
%if %{with tests}
0bfe6c
%check
0bfe6c
%{__python3} runtests.py -vv --no-pyregr %{?_smp_mflags} \
0bfe6c
  %ifarch %{ix86}
0bfe6c
  --exclude run.parallel  # https://github.com/cython/cython/issues/2807
0bfe6c
  %endif
0bfe6c
0bfe6c
%endif
0bfe6c
0bfe6c
0bfe6c
%files -n python%{python3_pkgversion}-Cython
0bfe6c
%license LICENSE.txt
0bfe6c
%doc *.txt Demos Doc Tools
0bfe6c
%{_bindir}/cython-%{python3_version}
0bfe6c
%{_bindir}/cygdb-%{python3_version}
0bfe6c
%{_bindir}/cythonize-%{python3_version}
0bfe6c
%{python3_site}/Cython-*.egg-info/
0bfe6c
%{python3_site}/Cython/
0bfe6c
%{python3_site}/pyximport/
0bfe6c
%pycached %{python3_site}/cython.py
0bfe6c
0bfe6c
%changelog
0bfe6c
* Mon Feb 13 2023 Charalampos Stratakis <cstratak@redhat.com> - 0.29.32-2
0bfe6c
- Bump release for gating
0bfe6c
0bfe6c
* Thu Oct 20 2022 Charalampos Stratakis <cstratak@redhat.com> - 0.29.32-1
0bfe6c
- Initial package
0bfe6c
- Fedora contributions by:
0bfe6c
      Alex Cobb <alex.cobb@smart.mit.edu>
0bfe6c
      Bill Nottingham <notting@fedoraproject.org>
0bfe6c
      Charalampos Stratakis <cstratak@redhat.com>
0bfe6c
      David Malcolm <dmalcolm@redhat.com>
0bfe6c
      Dennis Gilmore <dennis@ausil.us>
0bfe6c
      Gwyn Ciesla <gwync@protonmail.com>
0bfe6c
      Ignacio Vazquez-Abrams <ivazquez@fedoraproject.org>
0bfe6c
      Igor Gnatenko <ignatenkobrain@fedoraproject.org>
0bfe6c
      Jesse Keating <jkeating@fedoraproject.org>
0bfe6c
      Kevin Fenzi <kevin@fedoraproject.org>
0bfe6c
      Marcel Plch <mplch@redhat.com>
0bfe6c
      Miro Hrončok <miro@hroncok.cz>
0bfe6c
      nbecker <ndbecker2@gmail.com>
0bfe6c
      Neal D. Becker <ndbecker2@gmail.com>
0bfe6c
      Orion Poplawski <orion@cora.nwra.com>
0bfe6c
      Peter Robinson <pbrobinson@fedoraproject.org>
0bfe6c
      Petr Viktorin <pviktori@redhat.com>
0bfe6c
      Robert Kuska <rkuska@redhat.com>
0bfe6c
      Scott Talbert <swt@techie.net>
0bfe6c
      serge-sans-paille <sguelton@redhat.com>
0bfe6c
      Thomas Spura <thomas.spura@gmail.com>
0bfe6c
      Tomáš Hrnčiar <thrnciar@redhat.com>
0bfe6c
      Toshio くらとみ <toshio@fedoraproject.org>