%global service magnum %global plugin magnum-tempest-plugin %global module magnum_tempest_plugin %global with_doc 1 %{!?upstream_version: %global upstream_version %{version}%{?milestone}} %if 0%{?fedora} %global with_python3 1 %endif %global common_desc \ This package contains Tempest tests to cover the magnum project. \ Additionally it provides a plugin to automatically load these tests into Tempest. Name: python-%{service}-tests-tempest Version: XXX Release: XXX Summary: Tempest Integration of Magnum Project License: ASL 2.0 URL: https://git.openstack.org/cgit/openstack/%{plugin}/ Source0: http://tarballs.openstack.org/%{plugin}/%{plugin}-%{upstream_version}.tar.gz BuildArch: noarch BuildRequires: git BuildRequires: openstack-macros %description %{common_desc} %package -n python2-%{service}-tests-tempest Summary: %{summary} %{?python_provide:%python_provide python2-%{service}-tests-tempest} BuildRequires: python2-devel BuildRequires: python-pbr BuildRequires: python-setuptools Requires: python-pbr Requires: python-six >= 1.9.0 Requires: python-tempest >= 1:17.2.0 Requires: python-oslo-config Requires: python-oslo-log %description -n python2-%{service}-tests-tempest %{common_desc} %if 0%{?with_doc} %package -n python-%{service}-tests-tempest-doc Summary: python-%{service}-tests-tempest documentation BuildRequires: python-sphinx BuildRequires: python-openstackdocstheme %description -n python-%{service}-tests-tempest-doc It contains the documentation for the magnum tempest plugin. %endif %if 0%{?with_python3} %package -n python3-%{service}-tests-tempest Summary: %{summary} %{?python_provide:%python_provide python3-%{service}-tests-tempest} BuildRequires: python3-devel BuildRequires: python3-pbr BuildRequires: python3-setuptools Requires: python3-pbr Requires: python3-six >= 1.9.0 Requires: python3-tempest >= 1:17.2.0 Requires: python3-oslo-config Requires: python3-oslo-log %description -n python3-%{service}-tests-tempest %{common_desc} %endif %prep ls -l %autosetup -n %{module}-%{upstream_version} -S git # Let's handle dependencies ourseleves %py_req_cleanup # Remove bundled egg-info rm -rf %{module}.egg-info %build %if 0%{?with_python3} %py3_build %endif %py2_build # Generate Docs %if 0%{?with_doc} %{__python2} setup.py build_sphinx -b html # remove the sphinx build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} %endif %install %if 0%{?with_python3} %py3_install %endif %py2_install %files -n python2-%{service}-tests-tempest %license LICENSE %doc README.rst %{python2_sitelib}/%{module} %{python2_sitelib}/*.egg-info %if 0%{?with_python3} %files -n python3-%{service}-tests-tempest %license LICENSE %doc README.rst %{python3_sitelib}/%{module} %{python3_sitelib}/*.egg-info %endif %if 0%{?with_doc} %files -n python-%{service}-tests-tempest-doc %doc doc/build/html %license LICENSE %endif %changelog