File python-pycparser.spec of Package python-pycparser
# Created by pyp2rpm-3.2.3
%global pypi_name pycparser
Name: python-%{pypi_name}
Version: 2.18
Release: 1%{?dist}
Summary: C parser in Python
License: BSD
URL: https://github.com/eliben/pycparser
Source0: https://pypi.io/packages/source/p/pycparser/pycparser-%{version}.tar.gz
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%description
pycparser is a complete parser for the C language, written in pure Python.
It is a module designed to be easily integrated into applications that
need to parse C source code.
%package -n python2-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python2-%{pypi_name}}
%description -n python2-%{pypi_name}
pycparser is a complete parser for the C language, written in pure Python.
It is a module designed to be easily integrated into applications that
need to parse C source code.
%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 README.rst
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%changelog
* Fri Dec 22 2017 Yunfei Shi <shiyf2@lenovo.com> - 2.18-1
- Initial package.