File python-pbr.spec of Package python-pbr
# Created by pyp2rpm-3.2.3
%global pypi_name pbr
Name: python-%{pypi_name}
Version: 3.1.1
Release: 1%{?dist}
Summary: Python Build Reasonableness
License: None
URL: http://docs.openstack.org/developer/pbr/
Source0: https://pypi.io/packages/source/p/pbr/pbr-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%description
Manage dynamic plugins for Python applications
%package -n python2-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python2-%{pypi_name}}
Requires: python2-setuptools
%description -n python2-%{pypi_name}
Manage dynamic plugins for Python applications
%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%py2_build
%install
%py2_install
cp %{buildroot}/%{_bindir}/pbr %{buildroot}/%{_bindir}/pbr-%{python2_version}
ln -s %{_bindir}/pbr-%{python2_version} %{buildroot}/%{_bindir}/pbr-2
%files -n python2-%{pypi_name}
%if (0%{?rhel} >= 7) || (0%{?suse_version} >= 1315)
%license LICENSE pbr/tests/testpackage/LICENSE.txt
%endif
%doc README.rst pbr/tests/testpackage/README.txt
%{_bindir}/pbr
%{_bindir}/pbr-2
%{_bindir}/pbr-%{python2_version}
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%changelog
* Mon Dec 25 2017 Yunfei Shi <shiyf2@lenovo.com> - 3.1.1-1
- Initial package.