|
|
@ -1,105 +1,80 @@
|
|
|
|
# Disable tests on RHEL9 as to not pull in the test dependencies
|
|
|
|
%global srcname Cython
|
|
|
|
# Specify --with tests to run the tests e.g. on EPEL
|
|
|
|
%global upname cython
|
|
|
|
%bcond_with tests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# This bcond allows to ship a non-compiled version
|
|
|
|
# RHEL8: Tests disabled during build due to missing dependencies
|
|
|
|
# Slower, but sometimes necessary with alpha Python versions
|
|
|
|
%bcond_with tests
|
|
|
|
%bcond_without cython_compile
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Name: Cython
|
|
|
|
Name: Cython
|
|
|
|
Version: 0.29.22
|
|
|
|
Version: 0.29.21
|
|
|
|
Release: 7%{?dist}
|
|
|
|
%global upver %{version}
|
|
|
|
|
|
|
|
Release: 5%{?dist}
|
|
|
|
Summary: Language for writing Python extension modules
|
|
|
|
Summary: Language for writing Python extension modules
|
|
|
|
|
|
|
|
|
|
|
|
License: ASL 2.0
|
|
|
|
License: ASL 2.0
|
|
|
|
URL: http://www.cython.org
|
|
|
|
URL: http://www.cython.org
|
|
|
|
Source: https://github.com/cython/cython/archive/%{version}/Cython-%{version}.tar.gz
|
|
|
|
Source: https://github.com/cython/cython/archive/%{upver}/%{srcname}-%{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
# Exclude i686 arch. Due to a modularity issue it's being added to the
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
# x86_64 compose of CRB, but we don't want to ship it at all.
|
|
|
|
|
|
|
|
# See: https://projects.engineering.redhat.com/browse/RCM-72605
|
|
|
|
|
|
|
|
ExcludeArch: i686
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Partially work around issues with class and static methods
|
|
|
|
|
|
|
|
# See https://bugzilla.redhat.com/show_bug.cgi?id=1788506
|
|
|
|
|
|
|
|
# Mostly backported from upstream: https://github.com/cython/cython/pull/3106
|
|
|
|
|
|
|
|
# This also:
|
|
|
|
|
|
|
|
# - Removes staticmethod optimizations for normal functions
|
|
|
|
|
|
|
|
# - Removes failing test for staticmethod fused functions, which still fail
|
|
|
|
|
|
|
|
# See also: https://github.com/cython/cython/issues/3614
|
|
|
|
|
|
|
|
Patch3106: class-static-method-workaround.patch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
%if %{with tests}
|
|
|
|
%if %{with tests}
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: python3-numpy
|
|
|
|
|
|
|
|
BuildRequires: python3-jedi
|
|
|
|
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with cython_compile}
|
|
|
|
%global _description \
|
|
|
|
BuildRequires: gcc
|
|
|
|
This is a development version of Pyrex, a language\
|
|
|
|
%global python3_site %{python3_sitearch}
|
|
|
|
for writing Python extension modules.
|
|
|
|
%else
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%global python3_site %{python3_sitelib}
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global _description %{expand:
|
|
|
|
|
|
|
|
The Cython language makes writing C extensions for the Python language as easy
|
|
|
|
|
|
|
|
as Python itself. Cython is a source code translator based on Pyrex,
|
|
|
|
|
|
|
|
but supports more cutting edge functionality and optimizations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The Cython language is a superset of the Python language (almost all Python
|
|
|
|
|
|
|
|
code is also valid Cython code), but Cython additionally supports optional
|
|
|
|
|
|
|
|
static typing to natively call C functions, operate with C++ classes and
|
|
|
|
|
|
|
|
declare fast C types on variables and class attributes.
|
|
|
|
|
|
|
|
This allows the compiler to generate very efficient C code from Cython code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This makes Cython the ideal language for writing glue code for external C/C++
|
|
|
|
|
|
|
|
libraries, and for fast C modules that speed up the execution of Python code.}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description %{_description}
|
|
|
|
%description %{_description}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n python%{python3_pkgversion}-%{srcname}
|
|
|
|
%package -n python3-Cython
|
|
|
|
|
|
|
|
Summary: %{summary}
|
|
|
|
Summary: %{summary}
|
|
|
|
Provides: Cython = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
|
|
|
|
Provides: Cython%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
Provides: cython = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
BuildRequires: python%{python3_pkgversion}-rpm-macros
|
|
|
|
Provides: cython%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
|
|
%py_provides python3-cython
|
|
|
|
%if %{with tests}
|
|
|
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-numpy
|
|
|
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-jedi
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
Requires: python%{python3_pkgversion}-setuptools
|
|
|
|
|
|
|
|
|
|
|
|
# A small templating library is bundled in Cython/Tempita
|
|
|
|
# A small templating library is bundled in Cython/Tempita
|
|
|
|
# Upstream version 0.5.2 is available from https://pypi.org/project/Tempita
|
|
|
|
# Upstream version 0.5.2 is available from https://pypi.org/project/Tempita
|
|
|
|
# but the bundled copy is patched and reorganized.
|
|
|
|
# but the bundled copy is patched and reorganized.
|
|
|
|
# Upstream homepage is inaccessible.
|
|
|
|
# Upstream homepage is inaccessible.
|
|
|
|
Provides: bundled(python3dist(tempita))
|
|
|
|
Provides: bundled(python%{python3_version}dist(tempita))
|
|
|
|
|
|
|
|
|
|
|
|
%description -n python3-Cython %{_description}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n emacs-cython-mode
|
|
|
|
|
|
|
|
Summary: A major mode for editing Cython source files in Emacs
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
BuildRequires: emacs
|
|
|
|
|
|
|
|
Requires: emacs(bin) >= %{_emacs_version}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description -n emacs-cython-mode
|
|
|
|
%description -n python%{python3_pkgversion}-%{srcname} %{_description}
|
|
|
|
cython-mode is an Emacs major mode for editing Cython source files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Python 3 version.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%prep
|
|
|
|
%autosetup -n cython-%{version} -p1
|
|
|
|
%autosetup -n %{upname}-%{upver} -p1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
|
%py3_build -- %{!?with_cython_compile:--no-cython-compile}
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
|
|
|
|
# emacs-cython-mode build
|
|
|
|
|
|
|
|
echo ";;
|
|
|
|
|
|
|
|
(require 'cython-mode)" > cython-mode-init.el
|
|
|
|
|
|
|
|
cp -p Tools/cython-mode.el .
|
|
|
|
|
|
|
|
%{_emacs_bytecompile} *.el
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%install
|
|
|
|
%py3_install -- %{!?with_cython_compile:--no-cython-compile}
|
|
|
|
%py3_install
|
|
|
|
rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests
|
|
|
|
rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests
|
|
|
|
|
|
|
|
|
|
|
|
# emacs-cython-mode install
|
|
|
|
# Rename unversioned binaries
|
|
|
|
mkdir -p %{buildroot}%{_emacs_sitelispdir}/
|
|
|
|
mv %{buildroot}%{_bindir}/cython{,-%{python3_version}}
|
|
|
|
cp -p cython-mode.el cython-mode.elc %{buildroot}%{_emacs_sitelispdir}/
|
|
|
|
mv %{buildroot}%{_bindir}/cygdb{,-%{python3_version}}
|
|
|
|
mkdir -p %{buildroot}%{_emacs_sitestartdir}/
|
|
|
|
mv %{buildroot}%{_bindir}/cythonize{,-%{python3_version}}
|
|
|
|
cp -p cython-mode-init.el cython-mode-init.elc %{buildroot}%{_emacs_sitestartdir}/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
%if %{with tests}
|
|
|
|
%check
|
|
|
|
%check
|
|
|
@ -110,55 +85,22 @@ cp -p cython-mode-init.el cython-mode-init.elc %{buildroot}%{_emacs_sitestartdir
|
|
|
|
|
|
|
|
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python%{python3_pkgversion}-%{srcname}
|
|
|
|
%files -n python3-Cython
|
|
|
|
|
|
|
|
%license LICENSE.txt
|
|
|
|
%license LICENSE.txt
|
|
|
|
%doc *.txt Demos Doc Tools
|
|
|
|
%doc *.txt Demos Doc Tools
|
|
|
|
%{_bindir}/cython
|
|
|
|
%{_bindir}/cython-%{python3_version}
|
|
|
|
%{_bindir}/cygdb
|
|
|
|
%{_bindir}/cygdb-%{python3_version}
|
|
|
|
%{_bindir}/cythonize
|
|
|
|
%{_bindir}/cythonize-%{python3_version}
|
|
|
|
%{python3_site}/Cython-*.egg-info/
|
|
|
|
%{python3_sitearch}/%{srcname}-*.egg-info/
|
|
|
|
%{python3_site}/Cython/
|
|
|
|
%{python3_sitearch}/%{srcname}/
|
|
|
|
%{python3_site}/pyximport/
|
|
|
|
%{python3_sitearch}/pyximport/
|
|
|
|
%pycached %{python3_site}/cython.py
|
|
|
|
%{python3_sitearch}/%{upname}.py
|
|
|
|
|
|
|
|
%{python3_sitearch}/__pycache__/%{upname}.*
|
|
|
|
%files -n emacs-cython-mode
|
|
|
|
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
|
|
|
%{_emacs_sitelispdir}/cython*.el*
|
|
|
|
|
|
|
|
%{_emacs_sitestartdir}/cython*.el*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
* Wed Feb 16 2022 Tomas Orsava <torsava@redhat.com> - 0.29.22-7
|
|
|
|
* Wed Jan 13 2021 Tomas Orsava <torsava@redhat.com> - 0.29.21-5
|
|
|
|
- Add gating configuration and a simple smoke test
|
|
|
|
- Convert from Fedora to the python39 module in RHEL8
|
|
|
|
- Related: rhbz#1950291
|
|
|
|
- Resolves: rhbz#1877430
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Feb 08 2022 Tomas Orsava <torsava@redhat.com> - 0.29.22-6
|
|
|
|
|
|
|
|
- Add automatically generated Obsoletes tag with the python39- prefix
|
|
|
|
|
|
|
|
for smoother upgrade from RHEL8
|
|
|
|
|
|
|
|
- Related: rhbz#1990421
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com>
|
|
|
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com>
|
|
|
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Wed Mar 10 2021 Charalampos Stratakis <cstratak@redhat.com> - 0.29.22-3
|
|
|
|
|
|
|
|
- Disable tests on RHEL9 as to not pull in the test dependencies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Mar 09 2021 Miro Hrončok <mhroncok@redhat.com> - 0.29.22-2
|
|
|
|
|
|
|
|
- Remove an obsoleted patch
|
|
|
|
|
|
|
|
- Remove old Obsoletes and Conflicts
|
|
|
|
|
|
|
|
- Update description
|
|
|
|
|
|
|
|
- Provide cython, python3-cython
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Mar 04 2021 Miro Hrončok <mhroncok@redhat.com> - 0.29.22-1
|
|
|
|
|
|
|
|
- Update to 0.29.22
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.29.21-5
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Nov 13 2020 Miro Hrončok <mhroncok@redhat.com> - 0.29.21-4
|
|
|
|
* Fri Nov 13 2020 Miro Hrončok <mhroncok@redhat.com> - 0.29.21-4
|
|
|
|
- Drop build dependency on coverage
|
|
|
|
- Drop build dependency on coverage
|
|
|
|