File python-dracclient.spec of Package python-dracclient

#
# spec file for package python-dracclient
#
# 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/
#


%global sname python-dracclient
Name:           python-dracclient
Version:        1.4.0
Release:        0
Summary:        Library for managing machines with Dell iDRAC cards.
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://launchpad.net/%{sname}
Source0:        https://files.pythonhosted.org/packages/source/p/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python-coverage
BuildRequires:  python-devel
BuildRequires:  python-lxml
BuildRequires:  python-mock
BuildRequires:  python-pbr
BuildRequires:  python-requests
BuildRequires:  python-requests-mock
BuildRequires:  python-setuptools
Requires:       python-lxml
Requires:       python-requests
Requires:       python-six
BuildArch:      noarch

%description
Library for managing machines with Dell iDRAC cards.

%package doc
Summary:        Documentation for OpenStack Drac API Client
Group:          Documentation/HTML
BuildRequires:  python-Sphinx
BuildRequires:  python-oslosphinx
BuildRequires:  python-reno

%description doc
This is a client for the OpenStack Drac API and a command-line script (drac).
Each implements 100% of the OpenStack Drac API.
This package contains auto-generated documentation.

%prep
%autosetup -n %{sname}-%{version}
%py_req_cleanup

%build
%{py2_build}

%{__python2} setup.py build_sphinx
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}

%install
%{py2_install}

%check
coverage run --branch --source dracclient --omit "dracclient/tests*" -m unittest discover dracclient.tests

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

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

%changelog
openSUSE Build Service is sponsored by