File python-django_openstack_auth.spec of Package python-django_openstack_auth

#
# spec file for package python-django_openstack_auth
#
# Copyright (c) 2015 SUSE LINUX Products 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-django_openstack_auth
Version:        1.1.7
Release:        0
Summary:        A Django auth backend for use with the OpenStack Keystone
License:        Apache-2.0
Group:          Development/Languages/Python
Url:            http://django_openstack_auth.readthedocs.org/
Source:         http://tarballs.openstack.org/django_openstack_auth/django_openstack_auth-%{version}.tar.gz
Patch0:         0001_remove_admin_role_name_admin_hardcode_in_user_is_superuser.patch
BuildRequires:  python-devel
BuildRequires:  python-pbr >= 0.6
# Documentation requirements:
BuildRequires:  python-Sphinx >= 1.1.2
BuildRequires:  python-oslosphinx
# Test requirements:
BuildRequires:  python-Babel >= 1.3
BuildRequires:  python-Django >= 1.4
Requires:       python-Django >= 1.4
BuildRequires:  python-keystoneclient >= 0.6.0
BuildRequires:  python-mox3
Requires:       python-keystoneclient >= 0.8
Requires:       python-pbr >= 0.6
Requires:       python-six >= 1.6
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch:      noarch
%endif
Provides:       %{name}-test = %{version}
Obsoletes:      %{name}-test < %{version}

%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.

The current version is designed to work with the Keystone V2 API.

%prep
%setup -q -n django_openstack_auth-%{version}
%patch0 -p1

%build
python setup.py build
#python setup.py build_sphinx && rm build/sphinx/html/.buildinfo
# pbr is far to intrusive and calls to many builders, we just want docs, thus:
sphinx-build -b html doc/source build/sphinx/html && rm -r build/sphinx/html/.buildinfo

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}

%files
%defattr(-,root,root,-)
%doc LICENSE README.rst build/sphinx/html
%{python_sitelib}/django_openstack_auth-%{version}-py%{py_ver}.egg-info
%{python_sitelib}/openstack_auth
%lang(ar) %{python_sitelib}/openstack_auth/locale/ar/LC_MESSAGES/django.mo
%lang(de) %{python_sitelib}/openstack_auth/locale/de/LC_MESSAGES/django.mo
%lang(en_AU) %{python_sitelib}/openstack_auth/locale/en_AU/LC_MESSAGES/django.mo
%lang(en_GB) %{python_sitelib}/openstack_auth/locale/en_GB/LC_MESSAGES/django.mo
%lang(es_MX) %{python_sitelib}/openstack_auth/locale/es_MX/LC_MESSAGES/django.mo
%lang(fr) %{python_sitelib}/openstack_auth/locale/fr/LC_MESSAGES/django.mo
%lang(hi) %{python_sitelib}/openstack_auth/locale/hi/LC_MESSAGES/django.mo
%lang(ko_KR) %{python_sitelib}/openstack_auth/locale/ko_KR/LC_MESSAGES/django.mo
%lang(nl_NL) %{python_sitelib}/openstack_auth/locale/nl_NL/LC_MESSAGES/django.mo
%lang(pl_PL) %{python_sitelib}/openstack_auth/locale/pl_PL/LC_MESSAGES/django.mo
%lang(pt_BR) %{python_sitelib}/openstack_auth/locale/pt_BR/LC_MESSAGES/django.mo
%lang(pt) %{python_sitelib}/openstack_auth/locale/pt/LC_MESSAGES/django.mo
%lang(es) %{python_sitelib}/openstack_auth/locale/es/LC_MESSAGES/django.mo
%lang(ja) %{python_sitelib}/openstack_auth/locale/ja/LC_MESSAGES/django.mo
%lang(ru) %{python_sitelib}/openstack_auth/locale/ru/LC_MESSAGES/django.mo
%lang(uk) %{python_sitelib}/openstack_auth/locale/uk/LC_MESSAGES/django.mo
%lang(zh-tw) %{python_sitelib}/openstack_auth/locale/zh_TW/LC_MESSAGES/django.mo
%lang(zh-CN) %{python_sitelib}/openstack_auth/locale/zh_CN/LC_MESSAGES/django.mo

%changelog
openSUSE Build Service is sponsored by