File python-validations-libs.spec of Package python-validations-libs
#
# spec file for package python-validations-libs
#
# Copyright (c) 2023 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: python-validations-libs
Version: 1.0.4
Release: 0
Epoch: 0
Summary: A collection of python libraries for the Validation Framework
License: Apache-2.0
Group: Development/Languages/Python
URL: https://docs.openstack.org/validations-libs
Source0: https://files.pythonhosted.org/packages/source/v/validations-libs/validations-libs-1.0.4.tar.gz
BuildRequires: ansible
BuildRequires: ansible-runner
BuildRequires: openstack-macros
BuildRequires: python3-keystoneclient
BuildRequires: python39-PrettyTable
BuildRequires: python39-fixtures
BuildRequires: python39-os-client-config
BuildRequires: python39-oslo.utils
BuildRequires: python39-pbr
BuildRequires: python39-pyOpenSSL
BuildRequires: python39-stestr
BuildRequires: python39-testscenarios
BuildRequires: python39-testtools
BuildRequires: python39-warlock
BuildArch: noarch
%description
This is a collection of python libraries for the Validation Framework
#%package -n python-validations-libs
%package -n python39-validations-libs
Summary: A collection of python libraries for the Validation Framework
Requires: ansible
Requires: ansible-role-validations-libs
Requires: ansible-runner
Requires: python39-PrettyTable
Requires: python39-keystoneauth1
Requires: python39-oslo.i18n
Requires: python39-oslo.utils
Requires: python39-pbr
Requires: python39-pyOpenSSL
Requires: python39-requests
Requires: python39-six
Requires: python39-warlock
Requires: python39-wrapt
%description -n python39-validations-libs
This is a collection of python libraries for the Validation Framework.
%package -n python-validations-libs-doc
Summary: Documentation for Openstack python libraries for the Validation Framework
Group: Documentation/HTML
BuildRequires: python39-Sphinx
BuildRequires: python39-openstackdocstheme
BuildRequires: python39-reno
BuildRequires: python39-sphinxcontrib-apidoc
%description -n python-validations-libs-doc
This is a collection of python libraries for the Validation Framework.
This package contains auto-generated documentation.
%package -n ansible-role-validations-libs
Summary: Ansible role for the Validation Framework.
%description -n ansible-role-validations-libs
Ansible role for the Validation Framework.
%prep
%autosetup -p1 -n validations-libs-1.0.4
%py_req_cleanup
%build
%py3_build
# generate html docs
PBR_VERSION=1.0.4 %sphinx_build -b html doc/source doc/build/html
PBR_VERSION=1.0.4 %sphinx_build -b man doc/source doc/build/man
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
rm -rf doc/build/man/.{doctrees,buildinfo}
%install
%py3_install
#man pages
install -p -D -m 644 doc/build/man/validations-libs.1 \
%{buildroot}%{_mandir}/man1/validations-libs.1
# Temporary install of ansible roles
# will be performed on the next release directly through setup.py
# To be removed
install -p -D -m 755 -d %{buildroot}%{_datadir}/ansible/roles/validations/defaults
install -p -D -m 644 roles/validations/defaults/main.yaml \
%{buildroot}%{_datadir}/ansible/roles/validations/defaults/
install -p -D -m 755 -d %{buildroot}%{_datadir}/ansible/roles/validations/tasks
install -p -D -m 644 roles/validations/tasks/main.yaml \
roles/validations/tasks/validations.yaml \
%{buildroot}%{_datadir}/ansible/roles/validations/tasks/
install -p -D -m 755 -d %{buildroot}%{_datadir}/ansible/roles/fetch-validations/defaults
install -p -D -m 644 roles/fetch-validations/defaults/main.yaml \
%{buildroot}%{_datadir}/ansible/roles/fetch-validations/defaults/
%check
python3 -m stestr.cli run
%files -n python39-validations-libs
%license LICENSE
%doc README.rst ChangeLog
%{_mandir}/man1/validations-libs.1*
%{python3_sitelib}/validations_libs
%{python3_sitelib}/*.egg-info
%files -n python-validations-libs-doc
%license LICENSE
%doc doc/build/html
%files -n ansible-role-validations-libs
%license LICENSE
%{_datadir}/ansible/roles/fetch-validations
%{_datadir}/ansible/roles/validations
%changelog