File python-keystonemiddleware.spec of Package python-keystonemiddleware

#
# spec file for package python-keystonemiddleware
#
# 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 keystonemiddleware
Name:           python-keystonemiddleware
Version:        5.2.2
Release:        0
Summary:        Middleware for OpenStack Identity
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://launchpad.net/%{sname}
Source0:        https://files.pythonhosted.org/packages/source/k/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires:  openssl
BuildRequires:  openstack-macros
BuildRequires:  python2-WebOb
BuildRequires:  python2-WebTest
BuildRequires:  python2-cryptography
BuildRequires:  python2-fixtures
BuildRequires:  python2-keystoneauth1
BuildRequires:  python2-keystoneclient
BuildRequires:  python2-mock
BuildRequires:  python2-oslo.cache
BuildRequires:  python2-oslo.config
BuildRequires:  python2-oslo.context
BuildRequires:  python2-oslo.i18n
BuildRequires:  python2-oslo.messaging
BuildRequires:  python2-oslo.serialization
BuildRequires:  python2-oslo.utils
BuildRequires:  python2-oslotest
BuildRequires:  python2-pycadf
BuildRequires:  python2-python-memcached
BuildRequires:  python2-requests
BuildRequires:  python2-requests-mock
BuildRequires:  python2-six
BuildRequires:  python2-stevedore
BuildRequires:  python2-testrepository
BuildRequires:  python2-testresources
BuildRequires:  python2-testtools
BuildRequires:  python3-WebOb
BuildRequires:  python3-WebTest
BuildRequires:  python3-cryptography
BuildRequires:  python3-fixtures
BuildRequires:  python3-keystoneauth1
BuildRequires:  python3-keystoneclient
BuildRequires:  python3-mock
BuildRequires:  python3-oslo.cache
BuildRequires:  python3-oslo.config
BuildRequires:  python3-oslo.context
BuildRequires:  python3-oslo.i18n
BuildRequires:  python3-oslo.messaging
BuildRequires:  python3-oslo.serialization
BuildRequires:  python3-oslo.utils
BuildRequires:  python3-oslotest
BuildRequires:  python3-pycadf
BuildRequires:  python3-python-memcached
BuildRequires:  python3-requests
BuildRequires:  python3-requests-mock
BuildRequires:  python3-six
BuildRequires:  python3-stevedore
BuildRequires:  python3-testrepository
BuildRequires:  python3-testresources
BuildRequires:  python3-testtools
Requires:       python-WebOb
Requires:       python-keystoneauth1
Requires:       python-keystoneclient
Requires:       python-oslo.cache
Requires:       python-oslo.config
Requires:       python-oslo.context
Requires:       python-oslo.i18n
Requires:       python-oslo.serialization
Requires:       python-oslo.utils
Requires:       python-pycadf
Requires:       python-python-memcached
Requires:       python-requests
Requires:       python-six
BuildArch:      noarch
%python_subpackages

%description
This package contains middleware modules designed to provide authentication
and authorization features to web services other than Keystone
The most prominent module is keystonemiddleware.auth_token. This package
does not expose any CLI or Python API features.

%package -n python-keystonemiddleware-doc
Summary:        Documentation for Middleware for OpenStack Identity
Group:          Development/Languages/Python
BuildRequires:  python-Sphinx
BuildRequires:  python-openstackdocstheme
BuildRequires:  python-sphinxcontrib-apidoc

%description -n python-keystonemiddleware-doc
Documentation for Middleware for OpenStack Identity.

%prep
%autosetup -p1 -n %{sname}-%{version}
%py_req_cleanup
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg

%build
%{python_build}

%install
%{python_install}

# generate html docs
export PYTHONPATH=.
PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}

%check
export PYTHONWARNINGS="ignore"
%{python_expand rm -rf .testrepository
$python setup.py testr
}

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

%files -n python-keystonemiddleware-doc
%doc doc/build/html
%license LICENSE

%changelog
openSUSE Build Service is sponsored by