%global __python3 /usr/bin/python3.11 %global python3_pkgversion 3.11 Name: python%{python3_pkgversion}-cffi %global general_version 1.15.1 Version: %{general_version}%{?prerel:~%{prerel}} Release: 1%{?dist} Summary: Foreign Function Interface for Python to call C code License: MIT URL: https://cffi.readthedocs.org/ Source: https://foss.heptapod.net/pypy/cffi/-/archive/v%{version}/cffi-v%{version}.tar.bz2 # Adjust tests for a last minute Python 3.11 change in the traceback format Patch0: https://foss.heptapod.net/pypy/cffi/-/merge_requests/113.patch # Drop usage of the deprecated py.test package Patch1: https://foss.heptapod.net/pypy/cffi/-/merge_requests/115.patch # Drop usage of the deprecated py.code package Patch2: https://foss.heptapod.net/pypy/cffi/-/merge_requests/116.patch BuildRequires: make BuildRequires: libffi-devel BuildRequires: gcc BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-rpm-macros BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-pycparser Requires: python%{python3_pkgversion}-pycparser # For tests: BuildRequires: gcc-c++ %description Foreign Function Interface for Python, providing a convenient and reliable way of calling existing C code from Python. The interface is based on LuaJIT’s FFI. %prep %autosetup -p1 -n cffi-v%{general_version}%{?prerel} %build %py3_build %install %py3_install %check PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m pytest c/ testing/ %files -n python%{python3_pkgversion}-cffi %doc README.md %license LICENSE %{python3_sitearch}/cffi/ %{python3_sitearch}/_cffi_backend.*.so %{python3_sitearch}/cffi-%{general_version}%{?prerel}-py%{python3_version}.egg-info/ %changelog * Tue Nov 29 2022 Charalampos Stratakis - 1.15.1-1 - Initial package - Fedora contributions by: Charalampos Stratakis Dennis Gilmore Eric Smith Gwyn Ciesla Igor Gnatenko Iryna Shcherbina Joel Capitao John Dulaney Lumir Balhar Miro Hrončok Nathaniel McCallum Orion Poplawski Parag Nemade Peter Robinson Petr Viktorin Robert Kuska Slavek Kabrda Tomáš Hrnčiar Tom Stellard Troy Dawson