775b644
%global pypi_name pbr
6421ea7
6421ea7
%if 0%{?fedora}
6421ea7
%global with_python3 1
6421ea7
%endif
6421ea7
5b99fce
%if 0%{?fedora} > 19
5b99fce
%global do_test 1
5b99fce
%endif
5b99fce
5b99fce
# tests are failing currently
5b99fce
%global do_test 0
775b644
775b644
Name:           python-%{pypi_name}
b3ee31f
Version:        0.8.0
b3ee31f
Release:        1%{?dist}
775b644
Summary:        Python Build Reasonableness
775b644
775b644
License:        ASL 2.0
775b644
URL:            http://pypi.python.org/pypi/pbr
775b644
Source0:        http://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
775b644
BuildArch:      noarch
318a0aa
318a0aa
Requires:       python-pip
775b644
 
775b644
BuildRequires:  python2-devel
97e9a58
# very new required, when also using tests
f835897
BuildRequires:  python-d2to1 >= 0.2.10
5b99fce
5b99fce
%if 0%{?do_test} == 1
5b99fce
BuildRequires:  python-testtools
5b99fce
BuildRequires:  python-testscenarios
5b99fce
5b99fce
# still not packaged yet:
5b99fce
BuildRequires:  python-discover
5b99fce
BuildRequires:  python-coverage >= 3.6
5b99fce
BuildRequires:  python-flake8
5b99fce
BuildRequires:  python-mock >= 1.0
5b99fce
BuildRequires:  python-testrepository >= 0.0.18
5b99fce
BuildRequires:  python-subunit
5b99fce
BuildRequires:  python-testresources
5b99fce
%endif
5b99fce
4aa6093
4aa6093
%if 0%{?rhel}==6
4aa6093
BuildRequires: python-sphinx10
4aa6093
%else
4aa6093
BuildRequires: python-sphinx >= 1.1.3
4aa6093
%endif
4aa6093
6421ea7
%if 0%{?with_python3}
6421ea7
BuildRequires:  python3-devel
6421ea7
BuildRequires:  python3-d2to1
6421ea7
%endif
775b644
775b644
%description
775b644
PBR is a library that injects some useful and sensible default behaviors into 
775b644
your setuptools run. It started off life as the chunks of code that were copied
775b644
between all of the OpenStack projects. Around the time that OpenStack hit 18 
775b644
different projects each with at least 3 active branches, it seems like a good 
775b644
time to make that code into a proper re-usable library.
775b644
6421ea7
%if 0%{?with_python3}
6421ea7
%package -n python3-pbr
6421ea7
Summary:        Python Build Reasonableness
6421ea7
6421ea7
%description -n python3-pbr
6421ea7
Manage dynamic plugins for Python applications
6421ea7
%endif
6421ea7
775b644
%prep
775b644
%setup -q -n %{pypi_name}-%{version}
cb36574
# Remove the requirements file so that pbr hooks don't add it
cb36574
# to distutils requiers_dist config
cb36574
rm -rf {test-,}requirements.txt
5d3fd27
775b644
# Remove bundled egg-info
775b644
rm -rf %{pypi_name}.egg-info
775b644
6421ea7
%if 0%{?with_python3}
6421ea7
rm -rf %{py3dir}
6421ea7
cp -a . %{py3dir}
6421ea7
%endif
775b644
775b644
%build
775b644
%{__python} setup.py build
775b644
6421ea7
%if 0%{?with_python3}
6421ea7
pushd %{py3dir}
6421ea7
%{__python3} setup.py build
6421ea7
popd
6421ea7
%endif
6421ea7
775b644
# generate html docs 
4aa6093
%if 0%{?rhel}==6
4aa6093
sphinx-1.0-build doc/source html
4aa6093
%else
775b644
sphinx-build doc/source html
4aa6093
%endif
775b644
# remove the sphinx-build leftovers
775b644
rm -rf html/.{doctrees,buildinfo}
775b644
775b644
775b644
%install
775b644
%{__python} setup.py install --skip-build --root %{buildroot}
775b644
6421ea7
%if 0%{?with_python3}
6421ea7
pushd %{py3dir}
6421ea7
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
6421ea7
popd
6421ea7
%endif
6421ea7
5b99fce
%if 0%{?do_test} 
775b644
%check
97e9a58
# we don't have the necessary br's, yet
5b99fce
%{__python} setup.py test
5b99fce
%endif
775b644
775b644
%files
775b644
%doc html README.rst LICENSE
775b644
%{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
775b644
%{python_sitelib}/%{pypi_name}
7421937
6421ea7
%if 0%{?with_python3}
6421ea7
%files -n python3-pbr
6421ea7
%doc html README.rst LICENSE
6421ea7
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
6421ea7
%{python3_sitelib}/%{pypi_name}
6421ea7
%endif
6421ea7
775b644
%changelog
b3ee31f
* Wed Apr 30 2014 Matthias Runge <mrunge@redhat.com> - 0.8.0-1
b3ee31f
- update to 0.8.0 (rhbz#1078761)
b3ee31f
6421ea7
* Tue Apr 08 2014 Matthias Runge <mrunge@redhat.com> - 0.7.0-2
6421ea7
- Added python3 subpackage.
6421ea7
- slight modification of Ralph Beans proposal
6421ea7
5b99fce
* Mon Mar 24 2014 Matthias Runge <mrunge@redhat.com> - 0.7.0-1
5b99fce
- update to 0.7.0 (rhbz#1078761)
5b99fce
f835897
* Tue Feb 11 2014 Matthias Runge <mrunge@redhat.com> - 0.6.0-1
f835897
- update to 0.6.0 (rhbz#1061124)
f835897
b71f609
* Fri Nov 01 2013 Matthias Runge <mrunge@redhat.com> - 0.5.23-1
b71f609
- update to 0.5.23 (rhbz#1023926)
b71f609
318a0aa
* Tue Aug 13 2013 Matthias Runge <mrunge@redhat.com> - 0.5.21-2
318a0aa
- add requirement python-pip (rhbz#996192)
cb36574
- remove requirements.txt
318a0aa
f13711f
* Thu Aug 08 2013 Matthias Runge <mrunge@redhat.com> - 0.5.21-1
f13711f
- update to 0.5.21 (rhbz#990008)
f13711f
9a0991e
* Fri Jul 26 2013 Matthias Runge <mrunge@redhat.com> - 0.5.19-2
9a0991e
- remove one buildrequires: python-sphinx
9a0991e
6944a09
* Mon Jul 22 2013 Matthias Runge <mrunge@redhat.com> - 0.5.19-1
6944a09
- update to python-pbr-0.5.19 (rhbz#983008)
6944a09
45bd1a0
* Mon Jun 24 2013 Matthias Runge <mrunge@redhat.com> - 0.5.17-1
45bd1a0
- update to python-pbr-0.5.17 (rhbz#976026)
45bd1a0
37c09a1
* Wed Jun 12 2013 Matthias Runge <mrunge@redhat.com> - 0.5.16-1
37c09a1
- update to 0.5.16 (rhbz#973553)
37c09a1
eb026da
* Tue Jun 11 2013 Matthias Runge <mrunge@redhat.com> - 0.5.14-1
eb026da
- update to 0.5.14 (rhbz#971736)
eb026da
5d3fd27
* Fri May 31 2013 Matthias Runge <mrunge@redhat.com> - 0.5.11-2
5d3fd27
- remove requirement setuptools_git
4aa6093
- fix docs build under rhel
5d3fd27
97e9a58
* Fri May 17 2013 Matthias Runge <mrunge@redhat.com> - 0.5.11-1
97e9a58
- update to 0.5.11 (rhbz#962132)
97e9a58
- disable tests, as requirements can not be fulfilled right now
7421937
775b644
* Thu Apr 25 2013 Matthias Runge <mrunge@redhat.com> - 0.5.8-1
775b644
- Initial package.