File python-django-authopenid.spec of Package python-django-authopenid

#
# spec file for package python-django-authopenid
#
# Copyright (c) 2011 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-authopenid
Version:        1.0.1
Release:        0
Url:            http://hg.e-engura.org/django-authopenid/
Summary:        Openid authentification application for Django
License:        Apache-2.0
Group:          Development/Languages/Python
Source:         http://pypi.python.org/packages/source/d/django-authopenid/django-authopenid-%{version}.tar.gz
Source1:	README.sample
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  python-devel
BuildRequires:  python-distribute
BuildRequires:  python-django
BuildRequires:  python-python-openid
BuildRequires:	python-Sphinx
%if 0%{?suse_version}
%py_requires
%if 0%{?suse_version} > 1010
BuildRequires:  fdupes
%endif
%if 0%{?suse_version} > 1110
BuildArch:      noarch
%endif
%endif
Provides:       python-django-authopenid-sample = %{version}
Obsoletes:      python-django-authopenid-sample < %{version}
Provides:       python-django-authopenid-doc = %{version}
Obsoletes:      python-django-authopenid-doc < %{version}
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

%description
Django authentification application with openid using django auth contrib. 
This application allow a user to connect to you website with a legacy account 
(username/password) or an openid url.

%prep
%setup -q -n django-authopenid-%{version}
cp -p %{SOURCE1} .
find . -name ".*.*" -or -name ".DS_Store" | xargs rm # Remove junk
chmod -x example/templates/base.html # Docs shouldn't be executable
sed -i "1d" example/manage.py # Fix non-executable script

%build
python setup.py build
cd docs && make html && rm _build/html/.buildinfo # Build HTML documentation

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot} --install-data=%{python_sitelib}/django_authopenid
rm -rf %{buildroot}%{python_sitelib}/django_authopenid/{,django_authopenid}/tests # Don't package testsuite
%if 0%{?suse_version} > 1010
%fdupes %{buildroot}%{_prefix}
%endif

%files
%defattr(-,root,root,-)
%doc README LICENSE LICENSE_DJANGO AUTHORS CHANGES.md NOTICE THANKS docs/_build/html
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by