File python-django.spec of Package python-django.openSUSE_13.1_Update

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


Name:           python-django
Version:        1.5.12
Release:        0.<RELEASE7>
Summary:        A high-level Python Web framework
License:        BSD-3-Clause
Group:          Development/Languages/Python
Url:            http://www.djangoproject.com
# https://www.djangoproject.com/download/1.5.10/tarball/
Source:         Django-%{version}.tar.gz
Source1:        python-django-rpmlintrc
# PATCH-FIX-UPSTREAM Django-1.2-completion-only-for-bash.patch
Patch1:         Django-1.2-completion-only-for-bash.patch
# PATCH-FIX-UPSTREAM - see https://github.com/django/django/pull/150/files
Patch2:         Django-1.4-CSRF_COOKIE_HTTPONLY-support.patch
# PATCH-BACKPORTS from 1.6.x
Patch11:        0001-1.5.x-Stripped-headers-containing-underscores-to-pre.patch
Patch12:        0002-1.5.x-Fixed-is_safe_url-to-handle-leading-whitespace.patch
Patch13:        0003-1.5.x-Prevented-views.static.serve-from-using-large-.patch
Patch14:        0004-1.5.x-Fixed-DoS-possibility-in-ModelMultipleChoiceFi.patch
Patch15:        0005-1.6.x-Method-check_for_test_cookie-is-deprecated.patch
Patch16:        0006-1.5.x-Made-is_safe_url-reject-URLs-that-start-with-c.patch
Patch17:        0007-1.6.x-Fixed-DoS-possiblity-in-contrib.auth.views.log.patch
Patch18:        0008-1.5.x-Fixed-19324-Avoided-creating-a-session-record-.patch
Patch19:        0009-1.5.x-Prevented-newlines-from-being-accepted-in-some.patch
BuildRequires:  python-devel
Requires:       python-xml
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
#Requires:       gettext-tools
%if 0%{?suse_version}
%py_requires
%if 0%{?suse_version} > 1110
BuildArch:      noarch
%endif
%endif
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

%description
Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

%prep
%setup -q -n Django-%{version}
%patch1
%patch2
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
install -D -m 0755 extras/django_bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/django_bash_completion.sh
ln -s %{_bindir}/django-admin.py %{buildroot}%{_bindir}/django-admin

%files
%defattr(-,root,root,-)
%doc AUTHORS LICENSE README.rst
%{_bindir}/django-admin*
%{python_sitelib}/*
%{_sysconfdir}/bash_completion.d/django_bash_completion.sh

%changelog
openSUSE Build Service is sponsored by