Blame SPECS/python3.11-cffi.spec

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