%global pypi_name oslosphinx %if 0%{?fedora} %global with_python3 1 %endif Name: python-oslo-sphinx Version: 4.0.0 Release: 1%{?dist} Summary: OpenStack Sphinx Extensions License: ASL 2.0 URL: https://launchpad.net/oslo Source0: https://pypi.python.org/packages/source/o/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch %description The Oslo project intends to produce a python 2 library containing infrastructure code shared by OpenStack projects. The APIs provided by the project should be high quality, stable, consistent and generally useful. The oslo-sphinx library contains Sphinx theme and extensions support used by OpenStack. %package -n python2-oslo-sphinx Summary: OpenStack Sphinx Extensions and Theme for Python 2 BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python2-pbr BuildRequires: python2-requests >= 2.5.2 BuildRequires: python2-six >= 1.9.0 Requires: git Requires: python2-setuptools Requires: python2-requests >= 2.5.2 Requires: python2-six >= 1.9.0 %{?python_provide:%python_provide python2-%{pypi_name}} %description -n python2-oslo-sphinx The Oslo project intends to produce a python 2 library containing infrastructure code shared by OpenStack projects. The APIs provided by the project should be high quality, stable, consistent and generally useful. The oslo-sphinx library contains Sphinx theme and extensions support used by OpenStack. %if 0%{?with_python3} %package -n python3-oslo-sphinx Summary: OpenStack Sphinx Extensions and Theme for Python 3 BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pbr BuildRequires: python3-requests >= 2.5.2 BuildRequires: python3-six >= 1.9.0 Requires: git Requires: python3-setuptools Requires: python3-requests >= 2.5.2 Requires: python3-six >= 1.9.0 %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-oslo-sphinx The Oslo project intends to produce a python 3 library containing infrastructure code shared by OpenStack projects. The APIs provided by the project should be high quality, stable, consistent and generally useful. The oslo-sphinx library contains Sphinx theme and extensions support used by OpenStack. %endif %prep %setup -q -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %if 0%{?with_python3} cp -a . %{py3dir} %endif %build %py2_build %if 0%{?with_python3} pushd %{py3dir} %py3_build popd %endif %install %py2_install # create backward compatibile oslo.sphinx namespace package mkdir oslo mv oslosphinx oslo/sphinx sed -i 's/oslosphinx/oslo.sphinx/' oslo/sphinx/intersphinx.py sed -i '/packages =/ { N; s/oslosphinx/oslo\n\toslo.sphinx\nnamespace_packages =\n\toslo/ }' setup.cfg %py2_build %py2_install ln -s ../../oslosphinx/theme %{buildroot}%{python2_sitelib}/oslo/sphinx %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root=%{buildroot} popd %endif %files -n python2-oslo-sphinx %doc README.rst %license LICENSE %{python2_sitelib}/%{pypi_name} %{python2_sitelib}/oslo %{python2_sitelib}/*.egg-info %{python2_sitelib}/*-nspkg.pth %if 0%{?with_python3} %files -n python3-oslo-sphinx %doc README.rst %license LICENSE %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/*.egg-info %endif %changelog * Sat Nov 03 2018 Orion Poplawski - 4.0.0-1 - Update to 4.0.0 - Use new python macros - Ship python2-oslo-sphinx * Wed Mar 25 2015 Alan Pevec - 2.5.0-1 - Update to 2.5.0 * Fri Mar 13 2015 Parag Nemade - 2.3.0-3 - Added python3 subpackage * Mon Dec 15 2014 Alan Pevec - 2.3.0-2 - Update to 2.3.0 - Provide oslo.sphinx theme compatibility symlink * Tue Nov 04 2014 Alan Pevec - 2.2.0-1 - Update to 2.2.0 - Provide both old oslo.sphinx namespaced package and new oslosphinx * Sat Jun 07 2014 Fedora Release Engineering - 1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Fri Mar 07 2014 Pádraig Brady - 1.1-1 - Update to release 1.1 * Sun Aug 04 2013 Fedora Release Engineering - 1.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Mon Jul 22 2013 Pádraig Brady 1.0-3 - Review adjustments * Mon Jul 8 2013 Dan Prince 1.0-1 - Initial package.