Blame SPECS/python3.11-cffi.spec

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