File python-os-testr.spec of Package python-os-testr
#
# spec file for package python-os-testr
#
# Copyright (c) 2017 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/
#
%global sname os-testr
Name: python-os-testr
Version: 0.8.2
Release: 0
Summary: A testr wrapper to provide functionality for OpenStack projects
License: Apache-2.0
Group: Development/Languages/Python
Url: http://docs.openstack.org/developer/os-testr
Source0: https://pypi.io/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros
BuildRequires: python-ddt >= 1.0.1
BuildRequires: python-devel
BuildRequires: python-oslotest >= 1.10.0
BuildRequires: python-pbr >= 2.0.0
BuildRequires: python-testrepository >= 0.0.18
BuildRequires: python-testscenarios >= 0.4
Requires: python-Babel >= 2.3.4
Requires: python-pbr >= 2.0.0
Requires: python-python-subunit >= 0.0.18
Requires: python-testrepository >= 0.0.18
Requires: python-testtools >= 1.4.0
BuildArch: noarch
%description
A testr wrapper to provide functionality for OpenStack projects
* Documentation: http://docs.openstack.org/developer/os-testr
* Source: http://git.openstack.org/cgit/openstack/os-testr
* Bugs: http://bugs.launchpad.net/os-testr
%package doc
Summary: Documentation for the testr
Group: Documentation
BuildRequires: python-Sphinx
BuildRequires: python-oslosphinx >= 4.7.0
%description doc
Documentation for the testr wrapper.
%prep
%autosetup -n %{sname}-%{version}
%py_req_cleanup
%build
%{py2_build}
# generate html docs
%{__python2} setup.py build_sphinx
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
%install
%{py2_install}
%check
export PATH="$PATH:%{buildroot}/%{_bindir}"
export PYTHONPATH="%{python2_sitearch}:%{python2_sitelib}:%{buildroot}%{python2_sitelib}"
%{__python2} setup.py testr
%files
%defattr(-,root,root,-)
%license LICENSE
%doc README.rst ChangeLog
%{_bindir}/generate-subunit
%{_bindir}/ostestr
%{_bindir}/subunit-trace
%{_bindir}/subunit2html
%{python2_sitelib}/os_testr
%{python2_sitelib}/os_testr*egg-info
%files doc
%license LICENSE
%doc doc/build/html
%changelog