Blame SPECS/python3.11-Cython.spec

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