%bcond_with dotests %global __tar /opt/freeware/bin/tar %global py_major 3.9 %global python_major python%{py_major} %global pkgname Cython %global meta_package python3-%{pkgname} %global python3_sitearch %(%{python_major} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") Name: %{python_major}-%{pkgname} Version: 0.29.24 Release: 2 Summary: A language for writing Python 3 extension modules # Tools/site_scons/site_tools/pyext.py is MIT License: ASL 2.0 and MIT URL: https://pypi.python.org/pypi/%{pkgname} Source0: https://files.pythonhosted.org/packages/source/c/%{pkgname}/%{pkgname}-%{version}.tar.gz BuildRequires: %{python_major}-devel >= %{py_major} BuildRequires: %{python_major}-setuptools >= 65.2.0 Requires: %{python_major} >= %{py_major}.13 #%if %{with tests} #BuildRequires: gcc-c++ #BuildRequires: python3-numpy #BuildRequires: python3-jedi #%endif %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 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. %package -n %{meta_package} Summary: Meta-package for %{name} Requires: python3 >= %{py_major}.16 Requires: %{name} = %{version}-%{release} %description -n %{meta_package} This is a Meta-package for %{name} package. %prep %autosetup -n %{pkgname}-%{version} %build export PATH=/opt/freeware/bin:$PATH %{python_major} setup.py build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %{python_major} setup.py install --root %{buildroot} cd ${RPM_BUILD_ROOT}%{_bindir} for i in cython cythonize cygdb do cp ${i} ${i}3.9 done %check %if %{with dotests} #python3 -m venv python_venv #. ./python_venv/bin/activate #pip3 install pytest #pip3 install hypothesis #ulimit -d unlimited #ulimit -n unlimited #ulimit -m unlimited # ulimit -f unlimited #( python runtests.py -m 'full' -v || true ) #deactivate %endif %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %license LICENSE.txt %doc README.rst ToDo.txt USAGE.txt Demos %{_bindir}/cython3.9 %{_bindir}/cythonize3.9 %{_bindir}/cygdb3.9 %{python3_sitearch}/Cython-*.egg-info/ %{python3_sitearch}/Cython/ %{python3_sitearch}/cython.py %{python3_sitearch}/pyximport/ %{python3_sitearch}/__pycache__/cython* %files -n %{meta_package} %defattr(-,root,system,-) %{_bindir}/cython %{_bindir}/cythonize %{_bindir}/cygdb %changelog * Tue Feb 28 2023 Ayappan P - 0.29.24-2 - Build using python3.9 * Thu Sep 16 2021 Ayappan P - 0.29.24-1 - Update to 0.29.24 * Fri Apr 09 2021 Rishita Saha - 0.29.22-1 - Initial port to AIX Toolbox * Sun Aug 11 2019 Orion Poplawski - 0.28.5-1 - Update to 0.28.5 * Thu Mar 07 2019 Troy Dawson - 0.28.4-4 - Re-enable tests * Thu Mar 07 2019 Troy Dawson - 0.28.4-3 - Rebuilt to change main python from 3.4 to 3.6 - Disable tests for now * Wed Aug 08 2018 Carl George - 0.28.4-2 - Enable python36 subpackage * Sun Jul 29 2018 Orion Poplawski - 0.28.4-1 - Update to 0.28.4 * Mon Mar 28 2016 Orion Poplawski - 0.23.5-1 - Update to 0.23.5 - Macro usage cleanup - Fix license tag - Fix line endings - Remove unneeded shbangs * Thu Mar 3 2016 Orion Poplawski - 0.23.4-2 - Fixup files * Mon Jan 11 2016 Orion Poplawski - 0.23.4-1 - Initial EPEL7 package