Blame SPECS/python3.11-Cython.spec

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