Blame SPECS/python3.11-cffi.spec

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