diff --git a/pbr-5.10.0.tar.gz b/pbr-5.10.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..10d5723f5d08a04e70fd5ecf0a6034c380d616b0 Binary files /dev/null and b/pbr-5.10.0.tar.gz differ diff --git a/python-pbr.spec b/python-pbr.spec new file mode 100644 index 0000000000000000000000000000000000000000..de5d1ae065a1241ad0d10af91951dfb6ccf5c68d --- /dev/null +++ b/python-pbr.spec @@ -0,0 +1,113 @@ +%define anolis_release 1 + +%global pypi_name pbr + +%bcond_without bootstrap +%bcond_with tests + +Name: python-%{pypi_name} +Version: 5.10.0 +Release: %{anolis_release}%{dist} + +Summary: Python Build Reasonableness + +License: ASL 2.0 +URL: http://pypi.python.org/pypi/pbr +Source0: https://pypi.io/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz + +BuildArch: noarch + +BuildRequires: git-core +%if %{without bootstrap} +BuildRequires: python%{python3_pkgversion}-sphinx >= 1.1.3 +BuildRequires: python%{python3_pkgversion}-openstackdocstheme +BuildRequires: python%{python3_pkgversion}-sphinxcontrib-apidoc +%endif + +%description +PBR is a library that injects some useful and sensible default behaviors into +your setuptools run. It started off life as the chunks of code that were copied +between all of the OpenStack projects. Around the time that OpenStack hit 18 +different projects each with at least 3 active branches, it seems like a good +time to make that code into a proper re-usable library. + +%package -n python%{python3_pkgversion}-%{pypi_name} +Summary: Python Build Reasonableness +%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} + +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +%if %{with tests} +BuildRequires: gcc +BuildRequires: gnupg +BuildRequires: python%{python3_pkgversion}-fixtures +BuildRequires: python%{python3_pkgversion}-hacking +BuildRequires: python%{python3_pkgversion}-six +BuildRequires: python%{python3_pkgversion}-stestr +BuildRequires: python%{python3_pkgversion}-testrepository +BuildRequires: python%{python3_pkgversion}-testresources +BuildRequires: python%{python3_pkgversion}-testscenarios +BuildRequires: python%{python3_pkgversion}-virtualenv +BuildRequires: python%{python3_pkgversion}-wheel +%endif +Requires: python%{python3_pkgversion}-setuptools +Requires: git-core + +# /usr/bin/pbr moved from: +Conflicts: python2-%{pypi_name} < 5.4.3-2 + +%description -n python%{python3_pkgversion}-%{pypi_name} +Manage dynamic plugins for Python applications + +%package -n python%{python3_pkgversion}-pbr-doc +Summary: Documentation files for %{name} +Requires: python%{python3_pkgversion}-pbr = %{EVR} +BuildArch: noarch + +%description -n python%{python3_pkgversion}-pbr-doc +The %{name}-doc package contains documentation files for %{name}. + +%prep +%autosetup -n %{pypi_name}-%{version} -p1 + +rm -rf {test-,}requirements.txt pbr.egg-info/requires.txt + +%build +export SKIP_PIP_INSTALL=1 +%py3_build + +%if %{without bootstrap} +# generate html docs +sphinx-build doc/source html +# remove the sphinx-build leftovers +rm -rf html/.{doctrees,buildinfo} +%endif + +%install +%py3_install +rm -rf %{buildroot}%{python3_sitelib}/pbr/tests +mv %{buildroot}%{_bindir}/pbr %{buildroot}%{_bindir}/pbr-3 +ln -s ./pbr-3 %{buildroot}%{_bindir}/pbr + +%if %{with tests} +%check +export PYTHONPATH=%{buildroot}%{python3_sitelib} +export PYTHONDONTWRITEBYTECODE=1 +export PATH="%{buildroot}%{_bindir}:${PATH}" +# Exclude tests that require networking +stestr run -E 'test_requirement_parsing|test_pep_517_support' +%endif + +%files -n python%{python3_pkgversion}-pbr +%license LICENSE +%{_bindir}/pbr +%{_bindir}/pbr-3 +%{python3_sitelib}/%{pypi_name}-*.egg-info/ +%{python3_sitelib}/%{pypi_name}/ + +%files -n python%{python3_pkgversion}-pbr-doc +%doc README.rst %{?without_bootstrap:html} + +%changelog +* Wed Mar 29 2023 yuanhui - 5.10.0-1 +- Init package from upstream