From 4f65b56dcd1caeca41b8e228d1b0b4ef3cbdce47 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 8 Apr 2019 20:52:31 +0200 Subject: [PATCH] Fix build without git being installed in build env Without git being installed, the old (deprecated) pbr integration fails with Warning, treated as error: Cannot find git top directory, assuming "." we did not notice that in the SUSE CI because there was a local hack, but an actual openSUSE build fails. by switching to sphinx-build we can avoid this problem, which is more consistent with the rest of the spec files anyway. Change-Id: I2dced5316da56e580dddc78d9706ab7562c9257b --- openstack/automaton/automaton.spec.j2 | 2 +- openstack/castellan/castellan.spec.j2 | 4 ++-- openstack/debtcollector/debtcollector.spec.j2 | 2 +- openstack/keystoneauth1/keystoneauth1.spec.j2 | 4 ++-- openstack/os-brick/os-brick.spec.j2 | 4 ++-- openstack/os-service-types/os-service-types.spec.j2 | 2 +- openstack/oslo.concurrency/oslo.concurrency.spec.j2 | 2 +- openstack/oslo.context/oslo.context.spec.j2 | 2 +- openstack/oslo.db/oslo.db.spec.j2 | 4 ++-- openstack/oslo.i18n/oslo.i18n.spec.j2 | 2 +- openstack/oslo.messaging/oslo.messaging.spec.j2 | 6 +++--- openstack/oslo.middleware/oslo.middleware.spec.j2 | 2 +- openstack/oslo.policy/oslo.policy.spec.j2 | 2 +- openstack/oslo.privsep/oslo.privsep.spec.j2 | 2 +- openstack/oslo.reports/oslo.reports.spec.j2 | 2 +- openstack/oslo.serialization/oslo.serialization.spec.j2 | 2 +- openstack/oslo.service/oslo.service.spec.j2 | 2 +- openstack/oslo.utils/oslo.utils.spec.j2 | 1 - openstack/oslo.vmware/oslo.vmware.spec.j2 | 2 +- openstack/osprofiler/osprofiler.spec.j2 | 2 +- .../python-keystoneclient/python-keystoneclient.spec.j2 | 2 +- openstack/taskflow/taskflow.spec.j2 | 2 +- 22 files changed, 27 insertions(+), 28 deletions(-) diff --git a/openstack/automaton/automaton.spec.j2 b/openstack/automaton/automaton.spec.j2 index f2c8b4eb9..832fffef4 100644 --- a/openstack/automaton/automaton.spec.j2 +++ b/openstack/automaton/automaton.spec.j2 @@ -44,7 +44,7 @@ Documentation for the Automaton library. %{python_build} # generate html docs -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the Sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} diff --git a/openstack/castellan/castellan.spec.j2 b/openstack/castellan/castellan.spec.j2 index d96679e13..91dbd132e 100644 --- a/openstack/castellan/castellan.spec.j2 +++ b/openstack/castellan/castellan.spec.j2 @@ -45,7 +45,7 @@ Generic Key Manager interface for OpenStack. Summary: Documentation for castellan Group: Documentation/HTML BuildRequires: {{ py2pkg('Sphinx') }} -BuildRequires: {{ py2pkg('openstackdocstheme') }} +BuildRequires: {{ py2pkg('openstackdocstheme', py_versions=['py2', 'py3']) }} %description -n python-castellan-doc Castellan is a generic Key Manager interface for OpenStack. @@ -58,7 +58,7 @@ This package contains the documentation %build %{python_build} # generate html docs -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} diff --git a/openstack/debtcollector/debtcollector.spec.j2 b/openstack/debtcollector/debtcollector.spec.j2 index 3dbccc437..9ab368525 100644 --- a/openstack/debtcollector/debtcollector.spec.j2 +++ b/openstack/debtcollector/debtcollector.spec.j2 @@ -62,7 +62,7 @@ This package contains documentation in HTML format. %python_build # generate html doc -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the Sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} diff --git a/openstack/keystoneauth1/keystoneauth1.spec.j2 b/openstack/keystoneauth1/keystoneauth1.spec.j2 index 5b7d6f95b..9a6fa1d1a 100644 --- a/openstack/keystoneauth1/keystoneauth1.spec.j2 +++ b/openstack/keystoneauth1/keystoneauth1.spec.j2 @@ -48,7 +48,7 @@ Tools for authenticating to an OpenStack-based cloud. These tools include: %package -n python-keystoneauth1-doc Summary: Documentation for OpenStack authenticating tools BuildRequires: {{ py2pkg('Sphinx') }} -BuildRequires: {{ py2pkg('openstackdocstheme') }} +BuildRequires: {{ py2pkg('openstackdocstheme', py_versions=['py2', 'py3']) }} %description -n python-keystoneauth1-doc Documentation for OpenStack authenticating tools. @@ -67,7 +67,7 @@ echo "intersphinx_mapping = {}" >> doc/source/conf.py %{python_install} # generate html docs -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} diff --git a/openstack/os-brick/os-brick.spec.j2 b/openstack/os-brick/os-brick.spec.j2 index 233290547..0d2089e45 100644 --- a/openstack/os-brick/os-brick.spec.j2 +++ b/openstack/os-brick/os-brick.spec.j2 @@ -61,7 +61,7 @@ Features: %package -n {{ py2name() }}-doc Summary: Documentation for OpenStack os-brick library BuildRequires: {{ py2pkg('Sphinx') }} -BuildRequires: {{ py2pkg('openstackdocstheme') }} +BuildRequires: {{ py2pkg('openstackdocstheme', py_versions=['py2', 'py3']) }} %description -n {{ py2name() }}-doc OpenStack Cinder brick library for managing local volume attaches. @@ -84,7 +84,7 @@ Configuration files for the OpenStack Cinder brick library. %{python_build} # generate html docs -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} diff --git a/openstack/os-service-types/os-service-types.spec.j2 b/openstack/os-service-types/os-service-types.spec.j2 index 8bbc46a3f..58f495d9d 100644 --- a/openstack/os-service-types/os-service-types.spec.j2 +++ b/openstack/os-service-types/os-service-types.spec.j2 @@ -56,7 +56,7 @@ rm os_service_types/tests/test_remote.py %{python_build} # generate html docs -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} diff --git a/openstack/oslo.concurrency/oslo.concurrency.spec.j2 b/openstack/oslo.concurrency/oslo.concurrency.spec.j2 index b869551d8..17eb1e40d 100644 --- a/openstack/oslo.concurrency/oslo.concurrency.spec.j2 +++ b/openstack/oslo.concurrency/oslo.concurrency.spec.j2 @@ -70,7 +70,7 @@ This package contains the documentation. %{python_build} # generate html docs -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} diff --git a/openstack/oslo.context/oslo.context.spec.j2 b/openstack/oslo.context/oslo.context.spec.j2 index 3855ca4a5..6982bacf2 100644 --- a/openstack/oslo.context/oslo.context.spec.j2 +++ b/openstack/oslo.context/oslo.context.spec.j2 @@ -46,7 +46,7 @@ Documentation for the oslo-context library. %build %{python_build} # generate html docs -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} diff --git a/openstack/oslo.db/oslo.db.spec.j2 b/openstack/oslo.db/oslo.db.spec.j2 index 0c6be6daf..8c9dee0e3 100644 --- a/openstack/oslo.db/oslo.db.spec.j2 +++ b/openstack/oslo.db/oslo.db.spec.j2 @@ -62,7 +62,7 @@ to the different backends and helper utils. Summary: Documentation for the Oslo database handling library Group: Documentation/HTML BuildRequires: {{ py2pkg('Sphinx') }} -BuildRequires: {{ py2pkg('openstackdocstheme') }} +BuildRequires: {{ py2pkg('openstackdocstheme', py_versions=['py2', 'py3']) }} %description -n {{ py2name() }}-doc Documentation for the Oslo database handling library. @@ -75,7 +75,7 @@ Documentation for the Oslo database handling library. %{python_build} # generate html docs -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} diff --git a/openstack/oslo.i18n/oslo.i18n.spec.j2 b/openstack/oslo.i18n/oslo.i18n.spec.j2 index 898748e6e..497ab4b25 100644 --- a/openstack/oslo.i18n/oslo.i18n.spec.j2 +++ b/openstack/oslo.i18n/oslo.i18n.spec.j2 @@ -47,7 +47,7 @@ Documentation for the oslo.i18n library. %{python_install} # generate html docs -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} diff --git a/openstack/oslo.messaging/oslo.messaging.spec.j2 b/openstack/oslo.messaging/oslo.messaging.spec.j2 index ca96802df..733610792 100644 --- a/openstack/oslo.messaging/oslo.messaging.spec.j2 +++ b/openstack/oslo.messaging/oslo.messaging.spec.j2 @@ -108,9 +108,9 @@ rm -f oslo_messaging/tests/drivers/test_amqp_driver.py %{python_build} # generate html docs -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers -rm -rf build/sphinx/html/.{doctrees,buildinfo} +rm -rf doc/build/html/.{doctrees,buildinfo} %install %{python_install} @@ -134,6 +134,6 @@ rm -rf build/sphinx/html/.{doctrees,buildinfo} %files -n {{ py2name() }}-doc %license LICENSE -%doc build/sphinx/html +%doc doc/build/html %changelog diff --git a/openstack/oslo.middleware/oslo.middleware.spec.j2 b/openstack/oslo.middleware/oslo.middleware.spec.j2 index ee5c49137..7b0363330 100644 --- a/openstack/oslo.middleware/oslo.middleware.spec.j2 +++ b/openstack/oslo.middleware/oslo.middleware.spec.j2 @@ -71,7 +71,7 @@ This package contains the documentation. %{python_build} # generate html docs -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} diff --git a/openstack/oslo.policy/oslo.policy.spec.j2 b/openstack/oslo.policy/oslo.policy.spec.j2 index 5d037a46a..4c2f6821b 100644 --- a/openstack/oslo.policy/oslo.policy.spec.j2 +++ b/openstack/oslo.policy/oslo.policy.spec.j2 @@ -63,7 +63,7 @@ Documentation for the Oslo Policy library. %{python_build} # generate html docs -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} diff --git a/openstack/oslo.privsep/oslo.privsep.spec.j2 b/openstack/oslo.privsep/oslo.privsep.spec.j2 index 4cec050bc..296e30fcb 100644 --- a/openstack/oslo.privsep/oslo.privsep.spec.j2 +++ b/openstack/oslo.privsep/oslo.privsep.spec.j2 @@ -69,7 +69,7 @@ Documentation for oslo.privsep %build %python_build # generate html docs -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} diff --git a/openstack/oslo.reports/oslo.reports.spec.j2 b/openstack/oslo.reports/oslo.reports.spec.j2 index 70ace63d5..646454ec8 100644 --- a/openstack/oslo.reports/oslo.reports.spec.j2 +++ b/openstack/oslo.reports/oslo.reports.spec.j2 @@ -57,7 +57,7 @@ This package contains the documentation. %{python_build} # generate html docs -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} diff --git a/openstack/oslo.serialization/oslo.serialization.spec.j2 b/openstack/oslo.serialization/oslo.serialization.spec.j2 index a79ddb531..b05ac3a34 100644 --- a/openstack/oslo.serialization/oslo.serialization.spec.j2 +++ b/openstack/oslo.serialization/oslo.serialization.spec.j2 @@ -52,7 +52,7 @@ sed -i -e "s,bandit.*,," test-requirements.txt %{python_build} # generate html docs -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} diff --git a/openstack/oslo.service/oslo.service.spec.j2 b/openstack/oslo.service/oslo.service.spec.j2 index a0de1d22c..50b8571f1 100644 --- a/openstack/oslo.service/oslo.service.spec.j2 +++ b/openstack/oslo.service/oslo.service.spec.j2 @@ -79,7 +79,7 @@ This package contains the documentation. %{python_build} # generate html docs -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} diff --git a/openstack/oslo.utils/oslo.utils.spec.j2 b/openstack/oslo.utils/oslo.utils.spec.j2 index dc8e5db33..b6d254431 100644 --- a/openstack/oslo.utils/oslo.utils.spec.j2 +++ b/openstack/oslo.utils/oslo.utils.spec.j2 @@ -67,7 +67,6 @@ Documentation for OpenStack utils library. %python_install # generate html docs -#%{__python2} setup.py build_sphinx PBR_VERSION={{ upstream_version }} sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} diff --git a/openstack/oslo.vmware/oslo.vmware.spec.j2 b/openstack/oslo.vmware/oslo.vmware.spec.j2 index db8f59d7f..73c9ff822 100644 --- a/openstack/oslo.vmware/oslo.vmware.spec.j2 +++ b/openstack/oslo.vmware/oslo.vmware.spec.j2 @@ -77,7 +77,7 @@ Documentation for OpenStack common VMware library. %python_build # generate html docs -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} diff --git a/openstack/osprofiler/osprofiler.spec.j2 b/openstack/osprofiler/osprofiler.spec.j2 index 452686f9a..302154388 100644 --- a/openstack/osprofiler/osprofiler.spec.j2 +++ b/openstack/osprofiler/osprofiler.spec.j2 @@ -75,7 +75,7 @@ Documentation for OSProfiler. %python_clone -a %{buildroot}%{_bindir}/osprofiler # generate html docs -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} diff --git a/openstack/python-keystoneclient/python-keystoneclient.spec.j2 b/openstack/python-keystoneclient/python-keystoneclient.spec.j2 index f0ff77a2e..6a86ab804 100644 --- a/openstack/python-keystoneclient/python-keystoneclient.spec.j2 +++ b/openstack/python-keystoneclient/python-keystoneclient.spec.j2 @@ -65,7 +65,7 @@ echo "intersphinx_mapping = {}" >> doc/source/conf.py %{python_build} # Build HTML docs and man page -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html %install %{python_install} diff --git a/openstack/taskflow/taskflow.spec.j2 b/openstack/taskflow/taskflow.spec.j2 index 49b2502a0..e4e1746e2 100644 --- a/openstack/taskflow/taskflow.spec.j2 +++ b/openstack/taskflow/taskflow.spec.j2 @@ -97,7 +97,7 @@ sed -i /networkx.drawing/d taskflow/types/graph.py %{python_install} # generate html docs -%{__python2} setup.py build_sphinx +PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo}