f0498b
# RHEL: Docs disabled due to python3-sphinx not being installable during build of the python39 module
f0498b
%bcond_with docs
f0498b
f0498b
%bcond_without tests
f0498b
f0498b
Name:           python-cffi
f0498b
Version:        1.14.3
f0498b
Release:        2%{?dist}
f0498b
Summary:        Foreign Function Interface for Python to call C code
f0498b
License:        MIT
f0498b
URL:            https://cffi.readthedocs.org/
f0498b
Source0:        %{pypi_source cffi}
f0498b
f0498b
# Exclude i686 arch. Due to a modularity issue it's being added to the
f0498b
# x86_64 compose of CRB, but we don't want to ship it at all.
f0498b
# See: https://projects.engineering.redhat.com/browse/RCM-72605
f0498b
ExcludeArch: i686
f0498b
f0498b
BuildRequires:  make
f0498b
BuildRequires:  libffi-devel
f0498b
BuildRequires:  gcc
f0498b
f0498b
%if %{with tests}
f0498b
# For tests:
f0498b
BuildRequires:  gcc-c++
f0498b
%endif
f0498b
f0498b
%?python_enable_dependency_generator
f0498b
f0498b
%description
f0498b
Foreign Function Interface for Python, providing a convenient and
f0498b
reliable way of calling existing C code from Python. The interface is
f0498b
based on LuaJIT’s FFI.
f0498b
f0498b
%package -n python%{python3_pkgversion}-cffi
f0498b
Summary:        Foreign Function Interface for Python 3 to call C code
f0498b
%if %{with docs}
f0498b
BuildRequires:  python3-sphinx
f0498b
%endif
f0498b
%if %{with tests}
f0498b
BuildRequires:  python%{python3_pkgversion}-pytest
f0498b
%endif
f0498b
BuildRequires:  python%{python3_pkgversion}-devel
f0498b
BuildRequires:  python%{python3_pkgversion}-rpm-macros
f0498b
BuildRequires:  python%{python3_pkgversion}-setuptools
f0498b
BuildRequires:  python%{python3_pkgversion}-pycparser
f0498b
%{?python_provide:%python_provide python%{python3_pkgversion}-cffi}
f0498b
f0498b
%description -n python%{python3_pkgversion}-cffi
f0498b
Foreign Function Interface for Python, providing a convenient and
f0498b
reliable way of calling existing C code from Python. The interface is
f0498b
based on LuaJIT’s FFI.
f0498b
f0498b
%if %{with docs}
f0498b
%package doc
f0498b
Summary:        Documentation for CFFI
f0498b
BuildArch:      noarch
f0498b
f0498b
%description doc
f0498b
Documentation for CFFI, the Foreign Function Interface for Python.
f0498b
f0498b
%endif
f0498b
f0498b
f0498b
%prep
f0498b
%autosetup -p1 -n cffi-%{version}
f0498b
f0498b
%build
f0498b
%py3_build
f0498b
f0498b
%if %{with docs}
f0498b
cd doc
f0498b
make SPHINXBUILD=sphinx-build-3 html
f0498b
rm build/html/.buildinfo
f0498b
%endif
f0498b
f0498b
%install
f0498b
%py3_install
f0498b
f0498b
%if %{with tests}
f0498b
%check
f0498b
PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m pytest c/ testing/
f0498b
%endif
f0498b
f0498b
%files -n python%{python3_pkgversion}-cffi
f0498b
%doc PKG-INFO
f0498b
%license LICENSE
f0498b
%{python3_sitearch}/cffi/
f0498b
%{python3_sitearch}/_cffi_backend.*.so
f0498b
%{python3_sitearch}/cffi-%{version}-py%{python3_version}.egg-info/
f0498b
f0498b
%if %{with docs}
f0498b
%files doc
f0498b
%doc doc/build/html
f0498b
%endif
f0498b
f0498b
%changelog
f0498b
* Mon Jan 18 2021 Tomas Orsava <torsava@redhat.com> - 1.14.3-2
f0498b
- Convert from Fedora to the python39 module in RHEL8
f0498b
- Resolves: rhbz#1877430
f0498b
f0498b
* Thu Nov 19 2020 Joel Capitao <jcapitao@redhat.com> - 1.14.3-1
f0498b
- Update to 1.14.3
f0498b
f0498b
* Tue Sep 08 2020 Lumír Balhar <lbalhar@redhat.com> - 1.14.2-1
f0498b
- Update to 1.14.2 (#1869032)
f0498b
f0498b
* Fri Aug 14 2020 Miro Hrončok <mhroncok@redhat.com> - 1.14.1-1
f0498b
- Update to 1.14.1
f0498b
- Fixes: rhbz#1860698
f0498b
- Fixes: rhbz#1865276
f0498b
f0498b
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 1.14.0-2
f0498b
- Rebuilt for Python 3.9
f0498b
f0498b
* Mon Feb 10 2020 Lumír Balhar <lbalhar@redhat.com> - 1.14.0
f0498b
- Update to 1.14.0 (#1800646)
f0498b
f0498b
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.13.2-2
f0498b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
f0498b
f0498b
* Mon Nov 18 2019 Lumír Balhar <lbalhar@redhat.com> - 1.13.2-1
f0498b
- Update to 1.13.2 (#1768219)
f0498b
f0498b
* Mon Oct 21 2019 Miro Hrončok <mhroncok@redhat.com> - 1.13.1-1
f0498b
- Update to 1.13.1 (#1763767)
f0498b
f0498b
* Tue Oct 15 2019 Miro Hrončok <mhroncok@redhat.com> - 1.13.0-1
f0498b
- Update to 1.13.0 (#1761757)
f0498b
f0498b
* Sun Oct 13 2019 Miro Hrončok <mhroncok@redhat.com> - 1.12.3-5
f0498b
- Subpackage python2-cffi has been removed
f0498b
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
f0498b
f0498b
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.12.3-4
f0498b
- Rebuilt for Python 3.8.0rc1 (#1748018)
f0498b
f0498b
* Mon Aug 26 2019 Miro Hrončok <mhroncok@redhat.com> - 1.12.3-3
f0498b
- Reduce Python 2 build dependencies
f0498b
f0498b
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 1.12.3-2
f0498b
- Rebuilt for Python 3.8
f0498b
f0498b
* Thu Jul 25 2019 Miro Hrončok <mhroncok@redhat.com> - 1.12.3-1
f0498b
- Update to 1.12.3 (#1701577)
f0498b
- https://cffi.readthedocs.io/en/latest/whatsnew.html#v1-12-3
f0498b
f0498b
* Mon Jul 15 2019 Petr Viktorin <pviktori@redhat.com> - 1.12.2-2
f0498b
- Remove unused build dependency on Cython
f0498b
- Remove duplicate build dependency on pytest
f0498b
f0498b
* Wed Mar 27 2019 Miro Hrončok <mhroncok@redhat.com> - 1.12.2-1
f0498b
- Update to 1.12.2 (#1677888)
f0498b
f0498b
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.5-7
f0498b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
f0498b
f0498b
* Wed Aug 22 2018 Miro Hrončok <mhroncok@redhat.com> - 1.11.5-6
f0498b
- Fix FTBFS (#1605627)
f0498b
f0498b
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.5-5
f0498b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
f0498b
f0498b
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 1.11.5-4
f0498b
- Rebuilt for Python 3.7
f0498b
f0498b
* Fri May 25 2018 Gwyn Ciesla <limburgher@gmail.com> - 1.11.5-3
f0498b
- Disable tests to fix mock-only FTBFS.
f0498b
f0498b
* Fri Mar 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.11.5-2
f0498b
- Update Python 2 dependency declarations to new packaging standards
f0498b
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
f0498b
f0498b
* Fri Mar 02 2018 John Dulaney <jdulaney@Fedoraproject.org> - 1.11.2-1
f0498b
- New release 1.11.5
f0498b
f0498b
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.11.2-3
f0498b
- Escape macros in %%changelog
f0498b
f0498b
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.2-2
f0498b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f0498b
f0498b
* Thu Oct 19 2017 John Dulaney <jdulaney@Fedoraproject.org> - 1.11.2-1
f0498b
- New release 1.11.0
f0498b
- Fix %%check
f0498b
f0498b
* Wed Sep 27 2017 Troy Dawson <tdawson@redhat.com> - 1.11.0-2
f0498b
- Cleanup spec file conditionals
f0498b
f0498b
* Sat Sep 23 2017 John Dulaney <jdulaney@Fedoraproject.org> - 1.11.0-1
f0498b
- New release 1.11.0
f0498b
f0498b
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.0-3
f0498b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
f0498b
f0498b
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.0-2
f0498b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f0498b
f0498b
* Tue Apr 04 2017 John Dulaney <jdulaney@Fedoraproject.org> - 1.10.0-1
f0498b
- New release 1.10.0
f0498b
f0498b
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.1-2
f0498b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
f0498b
f0498b
* Sat Jan 07 2017 John Dulaney <jdulaney@Fedoraproject.org> - 1.9.1-1
f0498b
- Update to latest upstream 1.9.1
f0498b
f0498b
* Fri Jan 6 2017 Orion Poplawski <orion@cora.nwra.com> - 1.8.3-4
f0498b
- Modernize spec
f0498b
f0498b
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.8.3-3
f0498b
- Rebuild for Python 3.6
f0498b
- Disable test dependencies
f0498b
f0498b
* Thu Nov 03 2016 John Dulaney <jdulaney@Fedoraproject.org> - 1.8.3-2
f0498b
- Re-disable check
f0498b
f0498b
* Sun Sep 18 2016 John Dulaney <jdulaney@Fedoraproject.org> - 1.8.3-1
f0498b
- Update to 1.8.3
f0498b
- Reenable check
f0498b
f0498b
* Wed Sep 07 2016 John Dulaney <jdulaney@fedoraproject.org> - 1.8.2-1
f0498b
- Update to 1.8.2
f0498b
f0498b
* Tue Aug 09 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.7.0-3
f0498b
- Record installed files
f0498b
f0498b
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.0-2
f0498b
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
f0498b
f0498b
* Thu Jun 23 2016 John Dulaney <jdulaney@fedoraproject.org> - 1.7.0-1
f0498b
- Update to 1.7.0
f0498b
f0498b
* Thu Apr 28 2016 John Dulaney <jdulaney@fedoraproject.org> - 1.6.0-3
f0498b
- Switch Source0 to using pypi.io
f0498b
f0498b
* Thu Apr 28 2016 John Dulaney <jdulaney@fedoraproject.org> - 1.6.0-2
f0498b
- Update Source0 URL to account for pypi change
f0498b
f0498b
* Thu Apr 21 2016 John Dulaney <jdulaney@fedoraproject.org> - 1.6.0-1
f0498b
- Update to 1.6.0 (#1329203)
f0498b
f0498b
* Mon Feb 15 2016 John Dulaney <jdulaney@fedoraproject.org> - 1.5.2-1
f0498b
- Update to 1.5.2 (#1299272)
f0498b
f0498b
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-2
f0498b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
f0498b
f0498b
* Mon Jan 18 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.5.0-1
f0498b
- Update to 1.5.0 (#1299272)
f0498b
f0498b
* Mon Jan 11 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.4.2-2
f0498b
- Move python-cffi => python2-cffi
f0498b
f0498b
* Tue Dec 22 2015 John Dulaney <jdulaney@fedoraproject.org> - 1.4.2-1
f0498b
- Update to 1.4.2 (#1293504)
f0498b
f0498b
* Thu Dec 17 2015 John Dulaney <jdulaney@fedoraproject.org> - 1.4.1-1
f0498b
- Update to latest upstream release
f0498b
f0498b
* Fri Dec 11 2015 John Dulaney <jdulaney@fedoraproject.org> - 1.3.1-1
f0498b
- Update to latest upstream release
f0498b
f0498b
* Tue Oct 13 2015 Robert Kuska <rkuska@redhat.com> - 1.1.2-4
f0498b
- Rebuilt for Python3.5 rebuild
f0498b
f0498b
* Wed Jul 15 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.1.2-3
f0498b
- Modernize spec file
f0498b
- add missing source
f0498b
f0498b
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2-2
f0498b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
f0498b
f0498b
* Tue Jun 16 2015 Nathaniel McCallum <npmccallum@redhat.com> - 1.1.2-2
f0498b
- Update to 1.1.2
f0498b
- Fix license
f0498b
f0498b
* Tue Aug 19 2014 Eric Smith <spacewar@gmail.com> 0.8.6-1
f0498b
- Update to latest upstream.
f0498b
- No python3 in el7.
f0498b
f0498b
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-4
f0498b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
f0498b
f0498b
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-3
f0498b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
f0498b
f0498b
* Mon May 12 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.8.1-2
f0498b
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
f0498b
f0498b
* Wed Feb 26 2014 Eric Smith <spacewar@gmail.com> 0.8.1-1
f0498b
- Update to latest upstream.
f0498b
f0498b
* Tue Aug 13 2013 Eric Smith <spacewar@gmail.com> 0.6-5
f0498b
- Add Requires of python{,3}-pycparser.
f0498b
f0498b
* Thu Jul 25 2013 Eric Smith <spacewar@gmail.com> 0.6-4
f0498b
- Fix broken conditionals in spec (missing question marks), needed for el6.
f0498b
f0498b
* Tue Jul 23 2013 Eric Smith <spacewar@gmail.com> 0.6-3
f0498b
- Add Python3 support.
f0498b
f0498b
* Mon Jul 22 2013 Eric Smith <spacewar@gmail.com> 0.6-2
f0498b
- Better URL, and use version macro in Source0.
f0498b
f0498b
* Sun Jul 21 2013 Eric Smith <spacewar@gmail.com> 0.6-1
f0498b
- initial version