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/
#


Name:           python-dracclient
Version:        5.1.0
Release:        0
Summary:        Library for managing machines with Dell iDRAC cards.
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://docs.openstack.org/python-dracclient
Source0:        https://files.pythonhosted.org/packages/source/p/python-dracclient/python-dracclient-5.1.0.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python3-lxml
BuildRequires:  python3-mock
BuildRequires:  python3-pbr
BuildRequires:  python3-requests
BuildRequires:  python3-requests-mock
Requires:       python3-lxml
Requires:       python3-requests
Requires:       python3-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:  python3-Sphinx
BuildRequires:  python3-openstackdocstheme

%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 -p1 -n python-dracclient-5.1.0
%py_req_cleanup

%build
%{py3_build}

PBR_VERSION=%{version} %sphinx_build -b html doc/source doc/build/html
rm -rf doc/build/html/.{doctrees,buildinfo}

%install
%{py3_install}

%check
export PYTHONPATH=.:%{buildroot}%{python3_sitelib}
%{__python3} -m unittest discover dracclient.tests

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

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

%changelog