File python-os-faults.spec of Package python-os-faults
#
# spec file for package python-os-faults
#
# 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-faults
Version: 0.1.17
Release: 0
Summary: OpenStack fault-injection library
License: Apache-2.0
Group: Development/Languages/Python
URL: https://os-faults.readthedocs.io
Source0: https://files.pythonhosted.org/packages/source/o/os-faults/os_faults-%{version}.tar.gz
BuildRequires: ansible >= 2.2
BuildRequires: openstack-macros
BuildRequires: python-PyYAML >= 3.10.0
BuildRequires: python-appdirs >= 1.3.0
# rdo only has click version 6.3-1.el7
#BuildRequires: python-click >= 6.7
BuildRequires: python-click >= 6.7
BuildRequires: python-ddt
BuildRequires: python-devel
BuildRequires: python-iso8601 >= 0.1.11
BuildRequires: python-jsonschema >= 2.0.0
BuildRequires: python-libvirt-python
BuildRequires: python-mock
BuildRequires: python-oslo.i18n >= 2.1.0
BuildRequires: python-oslo.serialization >= 1.10.0
BuildRequires: python-oslo.utils >= 3.20.0
BuildRequires: python-oslotest
BuildRequires: python-pbr >= 2.0.0
BuildRequires: python-pyghmi >= 1.0.9
BuildRequires: python-pytest
BuildRequires: python-python-subunit
BuildRequires: python-setuptools
BuildRequires: python-six >= 1.9.0
BuildRequires: python-testrepository
BuildRequires: python-testscenarios
BuildRequires: python-testtools
Requires: ansible >= 2.2
Requires: python-PyYAML >= 3.10.0
Requires: python-appdirs >= 1.3.0
# rdo only has click version 6.3-1.el7
#Requires: python-click >= 6.7
Requires: python-click >= 6.7
Requires: python-iso8601 >= 0.1.11
Requires: python-jsonschema >= 2.0.0
Requires: python-oslo.i18n >= 2.1.0
Requires: python-oslo.serialization >= 1.10.0
Requires: python-oslo.utils >= 3.20.0
Requires: python-pbr >= 2.0.0
Requires: python-pyghmi >= 1.0.9
Requires: python-six >= 1.9.0
BuildArch: noarch
%if ! 0%{?rhel}
Recommends: python-libvirt-python
%endif
%description
The library does destructive actions inside an OpenStack cloud. It provides
an abstraction layer over different types of cloud deployments. The actions
are implemented as drivers (e.g. DevStack driver, Fuel driver, Libvirt driver,
IPMI driver).
%package doc
Summary: Documentation for OpenStack faults Library
Group: Documentation
BuildRequires: python-Sphinx
BuildRequires: python-openstackdocstheme
BuildRequires: python-reno
BuildRequires: python-sphinx_rtd_theme
%if ! 0%{?rdo}
# this package its dependency js-jquery is not available for RDO
BuildRequires: python-sphinxcontrib-programoutput
%endif
%description doc
The library does destructive actions inside an OpenStack cloud. It provides
an abstraction layer over different types of cloud deployments. The actions
are implemented as drivers (e.g. DevStack driver, Fuel driver, Libvirt driver,
IPMI driver).
This package contains the documentation.
%prep
%autosetup -p1 -n os_faults-%{version}
%py_req_cleanup
%if 0%{?rdo}
sed -i '/sphinxcontrib.programoutput/d' doc/source/conf.py
sed -i '/sphinx.ext.autosectionlabel/d' doc/source/conf.py
%endif
%build
%{py2_build}
%{__python2} setup.py build_sphinx --builder=html
rm -rf doc/build/html/.{doctrees,buildinfo}
%install
%{py2_install}
%check
#%{__python2} setup.py test
# the below instead of the above is to avoid pulling in requirements for coverage
export PYTHONPATH=.
export PATH=$PATH:%{buildroot}%{_bindir}
py.test -vvvv --durations=10 "os_faults/tests/unit"
%files
%defattr(-,root,root,-)
%doc README.rst ChangeLog
%license LICENSE
%{_bindir}/os-inject-fault
%{_bindir}/os-faults
%{python2_sitelib}/os_faults*
%files doc
%defattr(-,root,root,-)
%if ! 0%{?rdo}
%doc doc/build/html
%endif
%license LICENSE
%changelog