%global pypi_name oslo.service Name: python-oslo-service Version: 0.8.0 Release: 2%{?dist} Summary: Oslo service library License: ASL 2.0 URL: http://launchpad.net/oslo Source0: https://pypi.python.org/packages/source/o/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel python3-devel BuildRequires: python-pbr python3-pbr BuildRequires: python-sphinx python3-sphinx BuildRequires: python-oslo-sphinx python3-oslo-sphinx Requires: python-Babel python3-Babel Requires: python-eventlet >= 0.17.3 python3-eventlet >= 0.17.3 Requires: python-monotonic >= 0.1 python3-monotonic >= 0.1 Requires: python-oslo-config >= 1.11.0 python3-oslo-config >= 1.11.0 Requires: python-oslo-i18n python3-oslo-i18n Requires: python-oslo-utils >= 1.6.0 python3-oslo-utils >= 1.6.0 Requires: python-six >= 1.9.0 python3-six >= 1.9.0 %description Library for running OpenStack services %package -n python2-%{pypi_name} Summary: Oslo service library %{?python_provide:%python_provide python2-%{pypi_name}} %description -n python2-%{pypi_name} Library for running OpenStack services %package -n python3-%{pypi_name} Summary: Oslo service library %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} Library for running OpenStack services %package -n python2-%{pypi_name}-doc Summary: Documentation for OpenStack oslo service library %description -n python2-%{pypi_name}-doc Library for running OpenStack services %package -n python3-%{pypi_name}-doc Summary: Documentation for OpenStack oslo service library %description -n python3-%{pypi_name}-doc Library for running OpenStack services %prep %setup -q -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info rm -rf {test-,}requirements.txt %build %{__python2} setup.py build %if 0%{?with_python3} %{__python3} setup.py build %endif %install %{__python2} setup.py install --skip-build --root %{buildroot} export PYTHONPATH="$( pwd ):$PYTHONPATH" pushd doc sphinx-build -b html -d build/doctrees source build/html popd %if 0%{?with_python3} %{__python3} setup.py install --skip-build --root %{buildroot} export PYTHONPATH="$( pwd ):$PYTHONPATH" pushd doc sphinx-build-3 -b html -d build/doctrees source build/html %endif %files -n python2-%{pypi_name} %doc README.rst %license LICENSE %{python2_sitelib}/oslo_service %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %if 0%{?with_python3} %files -n python3-%{pypi_name} %doc README.rst %license LICENSE %{python3_sitelib}/oslo_service %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %endif %files -n python2-%{pypi_name}-doc %doc doc/build/html %license LICENSE %files -n python3-%{pypi_name}-doc %doc doc/build/html %license LICENSE %changelog * Tue Sep 01 2015 Chandan Kumar - 0.8.0-2 - Added python3 support * Thu Jun 18 2015 Haïkel Guémar - 0.8.0-1 - Initial package.