138 lines
4.7 KiB
RPMSpec
138 lines
4.7 KiB
RPMSpec
%define with_test 0
|
|
Name: python-Cython
|
|
Version: 0.29.33
|
|
Release: 1mamba
|
|
Summary: The Cython compiler for writing C extensions for the Python language
|
|
Group: Development/Tools
|
|
Vendor: openmamba
|
|
Distribution: openmamba
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
URL: https://cython.org/
|
|
Source: https://pypi.debian.net/Cython/Cython-%{version}.tar.gz
|
|
License: Apache License 2.0, Python
|
|
## AUTOBUILDREQ-BEGIN
|
|
BuildRequires: glibc-devel
|
|
BuildRequires: libpython3-devel
|
|
BuildRequires: python3.7dist(setuptools)
|
|
## AUTOBUILDREQ-END
|
|
|
|
%description
|
|
The Cython language makes writing C extensions for the Python language as easy as Python itself. Cython is a source code translator based on the well-known Pyrex, but supports more cutting edge functionality and optimizations.
|
|
The Cython language is very close to the Python language (and most Python code is also valid Cython code), but Cython additionally supports calling C functions and declaring 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 libraries, and for fast C modules that speed up the execution of Python code.
|
|
|
|
%if "0%{?with_pyver}" == "03"
|
|
%define py_requires_append \
|
|
Provides: Cython \
|
|
Obsoletes: Cython <= 1:3.0a7
|
|
%endif
|
|
|
|
%if 0%{?with_pyver}
|
|
%pyver_package
|
|
%endif
|
|
|
|
%debug_package
|
|
|
|
%prep
|
|
%setup -q -n Cython-%{version}
|
|
|
|
for p in $(find . -name "*.py"); do
|
|
sed -i 's|#!/usr/bin/python|#!%{__python}|' $p
|
|
sed -i 's|#!/usr/bin/env python|#!%{__python}|' $p
|
|
sed -i 's|#! /usr/bin/env python|#!%{__python}|' $p
|
|
sed -i 's|#!python|#!%{__python}|' $p
|
|
sed -i 's|#!/usr/local/bin/python2.1|#!%{__python}|' $p
|
|
sed -i 's|#!/usr/local/bin/python|#!%{__python}|' $p
|
|
done
|
|
|
|
sed -i 's|#!/usr/bin/env python|#!%{__python}|' bin/cython
|
|
sed -i 's|#!/usr/bin/env python|#!%{__python}|' bin/cython_freeze
|
|
|
|
%build
|
|
%{__python} setup.py build
|
|
|
|
%install
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
%{__python} setup.py install \
|
|
-O1 --skip-build \
|
|
--root="%{buildroot}" \
|
|
--install-headers=%{_includedir}/python3 \
|
|
--install-lib=%{python_sitearch} \
|
|
--record=%{name}.filelist
|
|
|
|
sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist
|
|
|
|
%if "0%{?with_pyver}" != "03"
|
|
for f in cygdb cython cythonize; do
|
|
mv %{buildroot}%{_bindir}/${f} %{buildroot}%{_bindir}/${f}-py%{with_pyver}
|
|
sed -i "s|${f}$|${f}-py%{with_pyver}|" %{name}.filelist
|
|
done
|
|
%endif
|
|
|
|
%clean
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
%if %with_test
|
|
# takes considerable time... for the first time...
|
|
%check
|
|
%{__python} runtests.py -x numpy
|
|
%endif
|
|
|
|
%files %{?pyappend} -f %{name}.filelist
|
|
%defattr(-,root,root)
|
|
%dir %{python_sitearch}/Cython-%{version}-py*.egg-info
|
|
%{python_sitearch}/Cython-%{version}-py*.egg-info/*
|
|
%doc COPYING.txt LICENSE.txt
|
|
|
|
%changelog
|
|
* Fri Jan 06 2023 Automatic Build System <autodist@mambasoft.it> 0.29.33-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Fri Aug 19 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 0.29.32-1mamba
|
|
- update to 0.29.32
|
|
|
|
* Tue Jun 15 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 3.0a7-1mamba
|
|
- update to 3.0a7
|
|
|
|
* Thu Apr 15 2021 Automatic Build System <autodist@mambasoft.it> 0.29.23-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Sun Feb 21 2021 Automatic Build System <autodist@mambasoft.it> 0.29.22-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Fri Oct 09 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 0.29.21-1mamba
|
|
- update to 0.29.21
|
|
|
|
* Wed Dec 18 2013 Automatic Build System <autodist@mambasoft.it> 0.19.2-1mamba
|
|
- automatic update by autodist
|
|
|
|
* Thu Sep 12 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.19.1-2mamba
|
|
- bump epoch up to allow upgrade from 0.19b1
|
|
|
|
* Sun Sep 08 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.19.1-1mamba
|
|
- update to 0.19.1
|
|
|
|
* Mon Apr 08 2013 Automatic Build System <autodist@mambasoft.it> 0.19b1-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Wed Feb 06 2013 Automatic Build System <autodist@mambasoft.it> 0.18-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Tue Jan 15 2013 Automatic Build System <autodist@mambasoft.it> 0.17.4-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Tue Jan 01 2013 Automatic Build System <autodist@mambasoft.it> 0.17.3-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Wed Oct 10 2012 Automatic Build System <autodist@mambasoft.it> 0.17.1-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Mon May 14 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.16-1mamba
|
|
- update to 0.16
|
|
|
|
* Thu Nov 11 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 0.13-2mamba
|
|
- imported from milestone1-contrib to devel
|
|
|
|
* Tue Nov 02 2010 gil <puntogil@libero.it> 0.13-1mamba
|
|
- package created by autospec
|