File python-os-traits.spec of Package python-os-traits

#
# spec file for package python-os-traits
#
# Copyright (c) 2020 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-os-traits
Version:        2.4.0
Release:        0
Summary:        Library containing standardized trait strings.
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://launchpad.net/os-traits
Source0:        https://files.pythonhosted.org/packages/source/o/os-traits/os-traits-%{version}.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python3-devel
BuildRequires:  python3-oslotest
BuildRequires:  python3-pbr
BuildRequires:  python3-python-subunit
BuildRequires:  python3-stestr
BuildRequires:  python3-testscenarios
BuildRequires:  python3-testtools
BuildArch:      noarch

%description
Traits are strings that represent a feature of some resource provider.  This
library contains the catalog of constants that have been standardized in the
OpenStack community to refer to a particular hardware, virtualization, storage,
network, or device trait.

%package -n python3-os-traits
Summary:        Library containing standardized trait strings
Group:          Development/Languages/Python
Requires:       python3-pbr
Requires:       python3-six

%description -n python3-os-traits
Traits are strings that represent a feature of some resource provider.  This
library contains the catalog of constants that have been standardized in the
OpenStack community to refer to a particular hardware, virtualization, storage,
network, or device trait.

%package -n python-os-traits-doc
Summary:        Documentation for OpenStack traits Library
Group:          Documentation/HTML
BuildRequires:  python3-Sphinx
BuildRequires:  python3-openstackdocstheme

%description -n python-os-traits-doc
Traits are strings that represent a feature of some resource provider.  This
library contains the catalog of constants that have been standardized in the
OpenStack community to refer to a particular hardware, virtualization, storage,
network, or device trait.

This package contains the documentation.

%prep
%autosetup -p1 -n os-traits-2.4.0
%py_req_cleanup

%build
%{py3_build}
PBR_VERSION=2.4.0 %sphinx_build -b html doc/source doc/build/html
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}

%install
%{py3_install}

%check
python3 -m stestr.cli run

%files -n python3-os-traits
%doc README.rst ChangeLog
%license LICENSE
%{python3_sitelib}/os_traits*
%{python3_sitelib}/*.egg-info

%files -n python-os-traits-doc
%doc doc/build/html
%license LICENSE

%changelog