File python-django.spec of Package python-django

#
# spec file for package python-django
#
# 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/
#


%define real_version 1.2.5

Name:           python-django
Version:        1.2.5
Release:        1
License:        BSD
Summary:        A high-level Python Web framework
Url:            http://www.djangoproject.com
Group:          Development/Libraries/Python
Source:         Django-%{real_version}.tar.bz2
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 empty-ip-2.diff
Patch2:         empty-ip-2.diff
BuildRequires:  python-devel
BuildRequires:  python-setuptools
Requires:       python-xml
Requires:       gettext-tools
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{py_requires}
%define py_vers %(%{__python} -c 'import sys; print int(10*float(sys.version[:3]))')
%if %{py_vers} < 26
Requires:       python-sqlite2
%endif
%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
BuildArch:      noarch
%else
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True)")}
%endif

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

Author:
--------
    Django Software Foundation <foundation@djangoproject.com>

%prep
%setup -q -n Django-%{real_version}
%patch1 -p1
%patch2 -p1

%build
export CFLAGS="%{optflags}"
%{__python} setup.py build

%install
%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot} --record-rpm=INSTALLED_FILES
%{__install} -d %{buildroot}%{_sysconfdir}/bash_completion.d
%{__install} -m 0755 extras/django_bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/django_bash_completion.sh

%clean
%{__rm} -rf %{buildroot}

%files -f INSTALLED_FILES
%defattr(-,root,root)
#%attr(755,root,root) %{python_sitelib}/django/bin/*.py
#%attr(644,root,root) %{python_sitelib}/django/bin/__init__.py
#%attr(755,root,root) %{python_sitelib}/django/conf/project_template/manage.py
#%attr(755,root,root) %{python_sitelib}/django/bin/profiling/gather_profile_stats.py
#%{_bindir}/django-admin.py
#%{python_sitelib}*
%{_sysconfdir}/bash_completion.d/django_bash_completion.sh
%doc README
%changelog
openSUSE Build Service is sponsored by