File python-python-tempestconf.spec of Package python-python-tempestconf

# spec file for package python-python-tempestconf
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%global with_doc 0
%global common_desc \
python-tempestconf will automatically generates the tempest \
configuration based on your cloud.
Name:           python-python-tempestconf
Version:        2.5.0
Release:        0
Summary:        OpenStack Tempest Config generator
License:        Apache-2.0
Group:          Development/Languages/Python
BuildRequires:  openstack-macros
BuildRequires:  openstack-tempest
BuildRequires:  python3-openstacksdk
BuildRequires:  python3-oslotest
BuildRequires:  python3-pbr
BuildRequires:  python3-setuptools
BuildRequires:  python3-stestr
BuildRequires:  python3-testscenarios
BuildRequires:  python3-testtools
BuildArch:      noarch


%package -n python3-tempestconf
Summary:        OpenStack Tempest Config generator
Group:          Development/Languages/Python
Requires:       openstack-tempest
Requires:       python3-PyYAML
Requires:       python3-castellan
Requires:       python3-cryptography
Requires:       python3-openstacksdk
Requires:       python3-pbr
Requires:       python3-requests

%description -n python3-tempestconf

This package contains the Python 3.x module.

%if 0%{?with_doc}
%package -n python-tempestconf-doc
Summary:        Documentation for python-tempestconf
Group:          Development/Languages/Python
BuildRequires:  python3-Sphinx
BuildRequires:  python3-openstackdocstheme
BuildRequires:  python3-sphinx-argparse

%description -n python-tempestconf-doc
It contains the documentation for the python-tempestconf.

%autosetup -p1 -n python-tempestconf-2.5.0
# Let's handle dependencies ourseleves
# Remove bundled egg-info
rm -rf %{module}.egg-info


# Generate Docs
%if 0%{?with_doc}
export PYTHONPATH="$( pwd ):$PYTHONPATH"
PBR_VERSION=2.5.0 %sphinx_build -b html doc/source doc/build/html
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}


# Disabling tests because it's failing for no reason
# %check
# export PYTHONPATH=.
# export OS_TEST_PATH=./config_tempest/tests
# ostestr

%files -n python3-tempestconf
%license LICENSE

%if 0%{?with_doc}
%files -n python-tempestconf-doc
%license LICENSE
%doc doc/build/html