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

#
# spec file for package python-os-traits
#
# Copyright (c) 2018 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 http://bugs.opensuse.org/
#


Name:           python-os-traits
Version:        0.9.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:  python-devel
BuildRequires:  python-oslotest
BuildRequires:  python-pbr >= 2.0.0
BuildRequires:  python-python-subunit
BuildRequires:  python-stestr
BuildRequires:  python-testscenarios
BuildRequires:  python-testtools
Requires:       python-pbr >= 2.0.0
Requires:       python-six >= 1.10.0
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 doc
Summary:        Documentation for OpenStack traits Library
Group:          Documentation/HTML
BuildRequires:  python-Sphinx
BuildRequires:  python-openstackdocstheme

%description 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-%{version}
%py_req_cleanup
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg

%build
%{py2_build}
%{__python2} setup.py build_sphinx --builder=html
rm -rf html/.{doctrees,buildinfo}

%install
%{py2_install}

%check
stestr run

%files
%doc README.rst ChangeLog
%license LICENSE
%{python2_sitelib}/os_traits*
%{python2_sitelib}/*.egg-info

%files doc
%doc doc/build/html
%license LICENSE

%changelog