File python-django_openstack_auth.spec of Package python-django_openstack_auth

#
# spec file for package python-django_openstack_auth
#
# Copyright (c) 2020 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 https://bugs.opensuse.org/
#


%global pypi_name django_openstack_auth
Name:           python-django_openstack_auth
Version:        2.4.2
Release:        0
Summary:        Django authentication backend for OpenStack Keystone
License:        Apache-2.0
Group:          Development/Languages/Python
Url:            http://docs.openstack.org/developer/django_openstack_auth/
Source0:        https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
# PATCH-FEATURE-UPSTREAM 0001-Add-support-for-a-domain-dropdown-menu-at-login.patch bsc#1046986
Patch0:         0001-Add-support-for-a-domain-dropdown-menu-at-login.patch
# PATCH-FEATURE-UPSTREAM 0002-Allow-for-manual-setting-of-default-service-region.patch bsc#1046906
Patch1:         0002-Allow-for-manual-setting-of-default-service-region.patch
BuildRequires:  openstack-macros
BuildRequires:  python-Django
BuildRequires:  python-devel
BuildRequires:  python-keystoneauth1
BuildRequires:  python-keystoneclient
BuildRequires:  python-mock
BuildRequires:  python-mox3
BuildRequires:  python-oslo.policy
BuildRequires:  python-oslotest
BuildRequires:  python-pbr
BuildRequires:  python-setuptools
BuildRequires:  python-testscenarios
Requires:       python-Django
Requires:       python-keystoneauth1
Requires:       python-keystoneclient
Requires:       python-oslo.config
Requires:       python-oslo.policy
Requires:       python-pbr
Requires:       python-six
BuildArch:      noarch

%description
Django OpenStack Auth is a pluggable Django authentication backend
that works with Django's ``contrib.auth`` framework to authenticate a
user against OpenStack's Keystone Identity API.

%package doc
Summary:        Documentation for %{name}
Group:          Documentation
BuildRequires:  python-Sphinx
BuildRequires:  python-oslosphinx

%description doc
Django OpenStack Auth is a pluggable Django authentication backend
that works with Django's ``contrib.auth`` framework to authenticate a
user against OpenStack's Keystone Identity API.

This package contains documentation in HTML format.

%prep
%setup -q -n %{pypi_name}-%{version}
%patch0 -p1
%patch1 -p1

%build
%py2_build

# generate html docs
%{__python2} setup.py build_sphinx
# remove the Sphinx-build leftovers
rm doc/build/html/.buildinfo

%check
PYTHONPATH=. %{__python2} openstack_auth/tests/run_tests.py

%install
%py2_install

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

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

%changelog
openSUSE Build Service is sponsored by