python-cffi update for python3 package
Signed-off-by: basebuilder_pel7ppc64lebuilder0 <basebuilder@powerel.org>master
parent
0b7d6aabaf
commit
706343e906
|
@ -1,109 +1,180 @@
|
|||
%global with_python3 1
|
||||
|
||||
Name: python-cffi
|
||||
Version: 1.7.0
|
||||
Version: 1.12.2
|
||||
Release: 1%{?dist}
|
||||
Summary: Foreign Function Interface for Python to call C code
|
||||
License: MIT
|
||||
URL: http://cffi.readthedocs.org/
|
||||
Source0: https://pypi.io/packages/source/c/cffi/cffi-%{version}.tar.gz
|
||||
URL: https://cffi.readthedocs.org/
|
||||
Source0: %{pypi_source cffi}
|
||||
|
||||
BuildRequires: libffi-devel python-sphinx
|
||||
BuildRequires: python-devel python-setuptools Cython python-pycparser
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel python3-setuptools python3-Cython python3-pycparser
|
||||
%endif # if with_python3
|
||||
BuildRequires: libffi-devel
|
||||
BuildRequires: gcc
|
||||
|
||||
Requires: python-pycparser
|
||||
# For tests:
|
||||
BuildRequires: gcc-c++
|
||||
|
||||
# Do not check .so files in the python_sitelib directory
|
||||
# or any files in the application's directory for provides
|
||||
%global __provides_exclude_from ^(%{python_sitearch}|%{python3_sitearch})/.*\\.so$
|
||||
%?python_enable_dependency_generator
|
||||
|
||||
%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.
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python2-cffi
|
||||
Summary: Foreign Function Interface for Python 3 to call C code
|
||||
BuildRequires: python2-pytest
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python2-setuptools
|
||||
BuildRequires: python2-Cython
|
||||
BuildRequires: python2-pycparser
|
||||
BuildRequires: python2-pytest
|
||||
%{?python_provide:%python_provide python2-cffi}
|
||||
|
||||
%description -n python2-cffi
|
||||
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.
|
||||
|
||||
%package -n python3-cffi
|
||||
Summary: Foreign Function Interface for Python 3 to call C code
|
||||
Requires: python3-pycparser
|
||||
BuildRequires: python3-sphinx
|
||||
BuildRequires: python3-pytest
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-Cython
|
||||
BuildRequires: python3-pycparser
|
||||
BuildRequires: python3-pytest
|
||||
%{?python_provide:%python_provide python3-cffi}
|
||||
|
||||
%description -n python3-cffi
|
||||
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.
|
||||
%endif # with_python3
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for CFFI
|
||||
BuildArch: noarch
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description doc
|
||||
Documentation for CFFI, the Foreign Function Interface for Python.
|
||||
|
||||
%prep
|
||||
%setup -q -n cffi-%{version}
|
||||
|
||||
%if 0%{?with_python3}
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
%endif # with_python3
|
||||
%autosetup -n cffi-%{version}
|
||||
|
||||
%build
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py build
|
||||
popd
|
||||
%endif # with_python3
|
||||
%py2_build
|
||||
%py3_build
|
||||
|
||||
%{__python} setup.py build
|
||||
cd doc
|
||||
make html
|
||||
rm build/html/.buildinfo
|
||||
|
||||
#%check
|
||||
## The following test procedure works when I run it manually, but fails
|
||||
## from rpmbuild, complaining that it can't import _cffi_backend, and I'm
|
||||
## not sure how to make it work
|
||||
#python setup_base.py build
|
||||
#PYTHONPATH=build/lib.linux-* py.test c/ testing/
|
||||
#cd doc
|
||||
#make SPHINXBUILD=sphinx-build-3 html
|
||||
#rm build/html/.buildinfo
|
||||
|
||||
%install
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py install --skip-build --prefix=%{_prefix} --root %{buildroot}
|
||||
popd
|
||||
%endif # with_python3
|
||||
%{__python} setup.py install \
|
||||
--skip-build --prefix=%{_prefix} --root %{buildroot} \
|
||||
--record %{buildroot}%{python_sitearch}/cffi-%{version}-py2.7.egg-info/installed-files.txt
|
||||
%py2_install
|
||||
%py3_install
|
||||
|
||||
%files
|
||||
%check
|
||||
PYTHONPATH=%{buildroot}%{python2_sitearch} %{__python2} -m pytest c/ testing/
|
||||
PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m pytest c/ testing/
|
||||
|
||||
%files -n python2-cffi
|
||||
%doc PKG-INFO
|
||||
%license LICENSE
|
||||
%{python_sitearch}/*
|
||||
%{python2_sitearch}/cffi/
|
||||
%{python2_sitearch}/_cffi_backend.so
|
||||
%{python2_sitearch}/cffi-%{version}-py%{python2_version}.egg-info/
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-cffi
|
||||
%doc PKG-INFO
|
||||
%license LICENSE
|
||||
%{python3_sitearch}/*
|
||||
%endif # with_python3
|
||||
%{python3_sitearch}/cffi/
|
||||
%{python3_sitearch}/_cffi_backend.*.so
|
||||
%{python3_sitearch}/cffi-%{version}-py%{python3_version}.egg-info/
|
||||
|
||||
%files doc
|
||||
%doc doc/build/html
|
||||
#%doc doc/build/html
|
||||
|
||||
%changelog
|
||||
* Tue Aug 09 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.6.0-5
|
||||
- Record installed files (#1255206)
|
||||
* Wed Mar 27 2019 Miro Hrončok <mhroncok@redhat.com> - 1.12.2-1
|
||||
- Update to 1.12.2 (#1677888)
|
||||
|
||||
* Tue May 03 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.6.0-4
|
||||
- Import from Fedora
|
||||
- Migrate python2-cffi => python-cffi
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.5-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Wed Aug 22 2018 Miro Hrončok <mhroncok@redhat.com> - 1.11.5-6
|
||||
- Fix FTBFS (#1605627)
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.5-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 1.11.5-4
|
||||
- Rebuilt for Python 3.7
|
||||
|
||||
* Fri May 25 2018 Gwyn Ciesla <limburgher@gmail.com> - 1.11.5-3
|
||||
- Disable tests to fix mock-only FTBFS.
|
||||
|
||||
* Fri Mar 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.11.5-2
|
||||
- Update Python 2 dependency declarations to new packaging standards
|
||||
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
||||
|
||||
* Fri Mar 02 2018 John Dulaney <jdulaney@Fedoraproject.org> - 1.11.2-1
|
||||
- New release 1.11.5
|
||||
|
||||
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.11.2-3
|
||||
- Escape macros in %%changelog
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Thu Oct 19 2017 John Dulaney <jdulaney@Fedoraproject.org> - 1.11.2-1
|
||||
- New release 1.11.0
|
||||
- Fix %%check
|
||||
|
||||
* Wed Sep 27 2017 Troy Dawson <tdawson@redhat.com> - 1.11.0-2
|
||||
- Cleanup spec file conditionals
|
||||
|
||||
* Sat Sep 23 2017 John Dulaney <jdulaney@Fedoraproject.org> - 1.11.0-1
|
||||
- New release 1.11.0
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Tue Apr 04 2017 John Dulaney <jdulaney@Fedoraproject.org> - 1.10.0-1
|
||||
- New release 1.10.0
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Sat Jan 07 2017 John Dulaney <jdulaney@Fedoraproject.org> - 1.9.1-1
|
||||
- Update to latest upstream 1.9.1
|
||||
|
||||
* Fri Jan 6 2017 Orion Poplawski <orion@cora.nwra.com> - 1.8.3-4
|
||||
- Modernize spec
|
||||
|
||||
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.8.3-3
|
||||
- Rebuild for Python 3.6
|
||||
- Disable test dependencies
|
||||
|
||||
* Thu Nov 03 2016 John Dulaney <jdulaney@Fedoraproject.org> - 1.8.3-2
|
||||
- Re-disable check
|
||||
|
||||
* Sun Sep 18 2016 John Dulaney <jdulaney@Fedoraproject.org> - 1.8.3-1
|
||||
- Update to 1.8.3
|
||||
- Reenable check
|
||||
|
||||
* Wed Sep 07 2016 John Dulaney <jdulaney@fedoraproject.org> - 1.8.2-1
|
||||
- Update to 1.8.2
|
||||
|
||||
* Tue Aug 09 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.7.0-3
|
||||
- Record installed files
|
||||
|
||||
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.0-2
|
||||
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
||||
|
||||
* Thu Jun 23 2016 John Dulaney <jdulaney@fedoraproject.org> - 1.7.0-1
|
||||
- Update to 1.7.0
|
||||
|
||||
* Thu Apr 28 2016 John Dulaney <jdulaney@fedoraproject.org> - 1.6.0-3
|
||||
- Switch Source0 to using pypi.io
|
||||
|
|
Loading…
Reference in New Issue