File python-cffi.spec of Package python-cffi
# Created by pyp2rpm-3.2.3
%global pypi_name cffi
Name: python-%{pypi_name}
Version: 1.11.2
Release: 1%{?dist}
Summary: Foreign Function Interface for Python calling C code
License: MIT
URL: http://cffi.readthedocs.org
Source0: https://pypi.io/packages/source/c/cffi/cffi-%{version}.tar.gz
BuildRequires: libffi-devel
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%global __provides_exclude_from ^(%{python2_sitearch}/.*\.so)$
%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.
%package -n python2-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python2-%{pypi_name}}
Requires: python2-pycparser
# Don't want provides for python shared objects
%{?filter_provides_in: %filter_provides_in %{python2_sitearch}/_cffi_backend.so}
%description -n python2-%{pypi_name}
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.
%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%py2_build
%install
%py2_install
%files -n python2-%{pypi_name}
%if (0%{?rhel} >= 7) || (0%{?suse_version} >= 1315)
%license LICENSE
%endif
%doc
%{python2_sitearch}/_cffi_backend.so
%{python2_sitearch}/%{pypi_name}
%{python2_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info
%changelog
* Fri Dec 22 2017 Yunfei Shi <shiyf2@lenovo.com> - 1.11.2-1
- Initial package.