[python-django] update to Django-1.5

Matthias Runge mrunge at fedoraproject.org
Fri Mar 22 09:16:44 UTC 2013


commit 81e3f305d000919646e435ae959275d76c6664ca
Author: Matthias Runge <mrunge at redhat.com>
Date:   Fri Mar 22 10:16:27 2013 +0100

    update to Django-1.5

 .gitignore                        |    1 +
 python-django-1.5-fix-tests.patch |   11 ++
 python-django.spec                |  193 ++++++++++++++++++++++++-------------
 sources                           |    3 +-
 4 files changed, 140 insertions(+), 68 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index b94a635..a1a01b1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
 /Django-1.4.4.tar.gz
 /Django-1.4.5.tar.gz
 /simplejson-init.py
+/Django-1.5.tar.gz
diff --git a/python-django-1.5-fix-tests.patch b/python-django-1.5-fix-tests.patch
new file mode 100644
index 0000000..c851034
--- /dev/null
+++ b/python-django-1.5-fix-tests.patch
@@ -0,0 +1,11 @@
+diff -up ./tests/regressiontests/views/tests/__init__.py.orig ./tests/regressiontests/views/tests/__init__.py
+--- ./tests/regressiontests/views/tests/__init__.py.orig	2013-02-27 12:43:30.919359871 +0100
++++ ./tests/regressiontests/views/tests/__init__.py	2013-02-27 12:43:42.469329487 +0100
+@@ -4,7 +4,6 @@ from .debug import (DebugViewTests, Exce
+     ExceptionReporterTests, PlainTextReportTests, ExceptionReporterFilterTests,
+     AjaxResponseExceptionReporterFilter)
+ from .defaults import DefaultsTests
+-from .i18n import JsI18NTests, I18NTests, JsI18NTestsMultiPackage, JavascriptI18nTests
+ from .shortcuts import ShortcutTests
+ from .specials import URLHandling
+ from .static import StaticHelperTest, StaticUtilsTests, StaticTests
diff --git a/python-django.spec b/python-django.spec
index a87b201..3cd2a24 100644
--- a/python-django.spec
+++ b/python-django.spec
@@ -1,6 +1,8 @@
-%{!?python_sitelib: %define 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(1))")}
-%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:5]")}
+%if 0%{?fedora} > 12 || 0%{?rhel} > 6
+%global with_python3 1
+%else
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
+%endif
 
 %global         pkgname Django
 
@@ -14,20 +16,17 @@
 %global         obs_ver 1.4.5-2
 
 Name:           python-django
-Version:        1.4.5
-Release:        2%{?dist}
+Version:        1.5
+Release:        1%{?dist}
 Summary:        A high-level Python Web framework
 
 Group:          Development/Languages
 License:        BSD
 URL:            http://www.djangoproject.com/
 Source0:        http://pypi.python.org/packages/source/D/Django/Django-%{version}.tar.gz
-Source1:        simplejson-init.py
 
 # patch tests to skip tests requiring internet connection
-Patch0:         Django-1.4-no-internet-connection-tests.patch
-# patch tests to relax performance scalability requirements
-Patch1:         Django-1.4-relax-scalability-req.patch
+Patch0:         python-django-1.5-fix-tests.patch
 
 
 BuildArch:      noarch
@@ -37,6 +36,11 @@ BuildRequires:  python2-devel
 %if 0%{?rhel} > 4 || 0%{?fedora} > 12
 BuildRequires:  python-sphinx
 %endif
+
+%if 0%{?with_python3}
+BuildRequires:  python3-devel
+%endif
+
 # for testing
 BuildRequires:  python-simplejson
 
@@ -69,43 +73,59 @@ This package contains the documentation for the Django high-level
 Python Web framework.
 %endif
 
-%prep
-%setup -q -n %{pkgname}-%{version}
+%if 0%{?with_python3}
+%package -n python3-django
+Summary:        A high-level Python Web framework
+Group:          Development/Languages
 
-%if ! %{with internet}
-# patch tests to skip tests requiring internet connection
-%patch0 -p1 -b .no-internet-connection-tests
+Requires:       python3
+
+%description -n python3-django
+Django is a high-level Python Web framework that encourages rapid
+development and a clean, pragmatic design. It focuses on automating as
+much as possible and adhering to the DRY (Don't Repeat Yourself)
+principle.
 %endif
-# patch tests to relax performance scalability requirements
-%patch1 -p1 -b .relax-scalability-req
+
+%prep
+%setup -q -n %{pkgname}-%{version}
+%patch0
 
 # empty files
 for f in \
-    django/contrib/humanize/models.py \
     django/contrib/markup/models.py \
     django/contrib/staticfiles/models.py \
     django/contrib/webdesign/models.py \
+    django/contrib/humanize/models.py \
 ; do
   echo "# just a comment" > $f
 done
 echo "<!-- nothing -->" > django/contrib/flatpages/tests/templates/registration/login.html
 
-# remove bundled simplejson (for tests)
-cd django/utils/simplejson
-rm -rf *
-# and put the replacement stub in place
-cp -p %{SOURCE1} __init__.py
-
-
+%if 0%{?with_python3}
+cp -a . %{py3dir}
+%endif
 
 
 %build
 %{__python} setup.py build
 
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with_python3
+
 
 %install
-rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
+%{__python} setup.py install --skip-build --root %{buildroot}
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+popd
+%endif # with_python3
+
 
 %find_lang django
 %find_lang djangojs
@@ -120,49 +140,53 @@ cat djangojs.lang >> django.lang
 
 
 # install man pages
-mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/
-cp -p docs/man/* $RPM_BUILD_ROOT%{_mandir}/man1/
+mkdir -p %{buildroot}/%{_mandir}/man1/
+cp -p docs/man/* %{buildroot}/%{_mandir}/man1/
 
 # install bash completion script
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/
+mkdir -p %{buildroot}/%{_sysconfdir}/bash_completion.d/
 install -m 0644 -p extras/django_bash_completion \
-   $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/
+   %{buildroot}%{_sysconfdir}/bash_completion.d/
 
 # Fix items in %%{_bindir}
-mv $RPM_BUILD_ROOT%{_bindir}/django-admin.py $RPM_BUILD_ROOT%{_bindir}/django-admin
+mv %{buildroot}/%{_bindir}/django-admin.py %{buildroot}/%{_bindir}/django-admin
 
 # remove .po files
 find $RPM_BUILD_ROOT -name "*.po" | xargs rm -f
 
-# Fix permissions
-chmod +x \
-  $RPM_BUILD_ROOT%{python_sitelib}/django/contrib/admin/static/admin/js/compress.py \
-  $RPM_BUILD_ROOT%{python_sitelib}/django/bin/profiling/gather_profile_stats.py
-
-
-
 %check
 export PYTHONPATH=$(pwd)
 export LANG=en_US.utf8
 cd tests
 ./runtests.py --settings=test_sqlite
 
+%if 0%{?with_python3}
+pushd %{py3dir}
+export PYTHONPATH=%{py3dir}
+cd tests
+%{__python3} runtests.py --settings=test_sqlite
+popd
+%endif # with_python3
+
 
 %files -f django.lang 
-%defattr(-,root,root,-)
-%doc AUTHORS LICENSE README
+%doc AUTHORS LICENSE README.rst
 %{_bindir}/django-admin
 %{_mandir}/man1/*
 %attr(0755,root,root) %{python_sitelib}/django/bin/*-messages.py*
 %attr(0755,root,root) %{python_sitelib}/django/bin/daily_cleanup.py*
 %attr(0755,root,root) %{python_sitelib}/django/bin/django-admin.py*
+%attr(0755,root,root) %{python_sitelib}/django/bin/django-2to3.py*
 %dir %{_sysconfdir}/bash_completion.d/
 %config(noreplace) %{_sysconfdir}/bash_completion.d/django_bash_completion
-%{python_sitelib}/django/bin/profiling/
+%dir %{python_sitelib}/django/bin/profiling/
+%attr(0755,root,root) %{python_sitelib}/django/bin/profiling/gather_profile_stats.py
 %{python_sitelib}/django/bin/__init__.py*
 # Include everything but the locale data ...
 %dir %{python_sitelib}/django
 %dir %{python_sitelib}/django/bin
+%{python_sitelib}/django/bin/profiling/__init__.py*
+%{python_sitelib}/django/bin/profiling/gather_profile_stats.py?
 %{python_sitelib}/django/db/
 %{python_sitelib}/django/*.py*
 %{python_sitelib}/django/shortcuts/
@@ -182,105 +206,134 @@ cd tests
 %dir %{python_sitelib}/django/contrib/admin/locale/??/
 %dir %{python_sitelib}/django/contrib/admin/locale/??_*/
 %dir %{python_sitelib}/django/contrib/admin/locale/*/LC_MESSAGES
+%{python_sitelib}/django/contrib/admin/*.py*
+%dir %{python_sitelib}/django/contrib/admin/bin/
+%attr(0755,root,root) %{python_sitelib}/django/contrib/admin/bin/compress.py
+%{python_sitelib}/django/contrib/admin/bin/compress.py?
+%{python_sitelib}/django/contrib/admin/views/
 %{python_sitelib}/django/contrib/admin/static/
+%{python_sitelib}/django/contrib/admin/templatetags/
+%{python_sitelib}/django/contrib/admin/templates/
 %dir %{python_sitelib}/django/contrib/admindocs/
 %dir %{python_sitelib}/django/contrib/admindocs/locale/
 %dir %{python_sitelib}/django/contrib/admindocs/locale/??/
 %dir %{python_sitelib}/django/contrib/admindocs/locale/??_*/
 %dir %{python_sitelib}/django/contrib/admindocs/locale/*/LC_MESSAGES
+%{python_sitelib}/django/contrib/admindocs/*.py*
+%{python_sitelib}/django/contrib/admindocs/templates/
+%{python_sitelib}/django/contrib/admindocs/tests/
 %dir %{python_sitelib}/django/contrib/auth/
 %dir %{python_sitelib}/django/contrib/auth/locale/
 %dir %{python_sitelib}/django/contrib/auth/locale/??/
 %dir %{python_sitelib}/django/contrib/auth/locale/??_*/
 %dir %{python_sitelib}/django/contrib/auth/locale/*/LC_MESSAGES
+%{python_sitelib}/django/contrib/auth/*.py*
+%{python_sitelib}/django/contrib/auth/fixtures/
+%{python_sitelib}/django/contrib/auth/handlers/
+%{python_sitelib}/django/contrib/auth/management/
+%{python_sitelib}/django/contrib/auth/templates/
+%{python_sitelib}/django/contrib/auth/tests/
 %dir %{python_sitelib}/django/contrib/comments/
 %dir %{python_sitelib}/django/contrib/comments/locale/
 %dir %{python_sitelib}/django/contrib/comments/locale/??/
 %dir %{python_sitelib}/django/contrib/comments/locale/??_*/
 %dir %{python_sitelib}/django/contrib/comments/locale/*/LC_MESSAGES
+%{python_sitelib}/django/contrib/comments/*.py*
+%{python_sitelib}/django/contrib/comments/views
+%{python_sitelib}/django/contrib/comments/templatetags
+%{python_sitelib}/django/contrib/comments/templates
 %dir %{python_sitelib}/django/contrib/contenttypes/
 %dir %{python_sitelib}/django/contrib/contenttypes/locale
 %dir %{python_sitelib}/django/contrib/contenttypes/locale/??/
 %dir %{python_sitelib}/django/contrib/contenttypes/locale/??_*/
 %dir %{python_sitelib}/django/contrib/contenttypes/locale/*/LC_MESSAGES
+%{python_sitelib}/django/contrib/contenttypes/*.py*
 %dir %{python_sitelib}/django/contrib/databrowse/
+%{python_sitelib}/django/contrib/databrowse/plugins
+%{python_sitelib}/django/contrib/databrowse/templates
+%{python_sitelib}/django/contrib/databrowse/*.py*
 %dir %{python_sitelib}/django/contrib/flatpages/
 %dir %{python_sitelib}/django/contrib/flatpages/locale/
 %dir %{python_sitelib}/django/contrib/flatpages/locale/??/
 %dir %{python_sitelib}/django/contrib/flatpages/locale/??_*/
 %dir %{python_sitelib}/django/contrib/flatpages/locale/*/LC_MESSAGES
+%{python_sitelib}/django/contrib/flatpages/*.py*
+%{python_sitelib}/django/contrib/flatpages/fixtures/
+%{python_sitelib}/django/contrib/flatpages/templatetags
+%{python_sitelib}/django/contrib/flatpages/tests
 %dir %{python_sitelib}/django/contrib/formtools/
 %dir %{python_sitelib}/django/contrib/formtools/locale/
 %dir %{python_sitelib}/django/contrib/formtools/locale/??/
 %dir %{python_sitelib}/django/contrib/formtools/locale/??_*/
 %dir %{python_sitelib}/django/contrib/formtools/locale/*/LC_MESSAGES
+%{python_sitelib}/django/contrib/formtools/*.py*
+%{python_sitelib}/django/contrib/formtools/templates/
+%{python_sitelib}/django/contrib/formtools/tests/
 %{python_sitelib}/django/contrib/formtools/wizard/
 %dir %{python_sitelib}/django/contrib/gis/
 %dir %{python_sitelib}/django/contrib/gis/locale/
 %dir %{python_sitelib}/django/contrib/gis/locale/??/
 %dir %{python_sitelib}/django/contrib/gis/locale/??_*/
 %dir %{python_sitelib}/django/contrib/gis/locale/*/LC_MESSAGES
+%{python_sitelib}/django/contrib/gis/*.py*
 %{python_sitelib}/django/contrib/gis/geoip/
 %dir %{python_sitelib}/django/contrib/humanize/
 %dir %{python_sitelib}/django/contrib/humanize/locale/
 %dir %{python_sitelib}/django/contrib/humanize/locale/??/
 %dir %{python_sitelib}/django/contrib/humanize/locale/??_*/
 %dir %{python_sitelib}/django/contrib/humanize/locale/*/LC_MESSAGES
-%dir %{python_sitelib}/django/contrib/localflavor/
+%{python_sitelib}/django/contrib/humanize/templatetags/
+%{python_sitelib}/django/contrib/humanize/*.py*
+%dir %{python_sitelib}/django/contrib/localflavor
 %dir %{python_sitelib}/django/contrib/localflavor/??/
-%dir %{python_sitelib}/django/contrib/localflavor/??_??/
-%{python_sitelib}/django/contrib/localflavor/??/*
-%{python_sitelib}/django/contrib/localflavor/??_??/*
-%dir %{python_sitelib}/django/contrib/localflavor/locale
-%dir %{python_sitelib}/django/contrib/localflavor/locale/??/
-%dir %{python_sitelib}/django/contrib/localflavor/locale/??_*/
-%dir %{python_sitelib}/django/contrib/localflavor/locale/*/LC_MESSAGES/
-%dir %{python_sitelib}/django/contrib/markup/
+%dir %{python_sitelib}/django/contrib/localflavor/??_/
+%{python_sitelib}/django/contrib/localflavor/*.py*
+%{python_sitelib}/django/contrib/localflavor/??/*.py*
+%{python_sitelib}/django/contrib/localflavor/??_/*.py*
+%{python_sitelib}/django/contrib/localflavor/generic
+%{python_sitelib}/django/contrib/markup
 %dir %{python_sitelib}/django/contrib/messages/
 %dir %{python_sitelib}/django/contrib/messages/locale
 %dir %{python_sitelib}/django/contrib/messages/locale/??/
 %dir %{python_sitelib}/django/contrib/messages/locale/??_*/
 %dir %{python_sitelib}/django/contrib/messages/locale/*/LC_MESSAGES
+%{python_sitelib}/django/contrib/messages/*.py*
+%{python_sitelib}/django/contrib/messages/tests
 %dir %{python_sitelib}/django/contrib/redirects
 %dir %{python_sitelib}/django/contrib/redirects/locale
 %dir %{python_sitelib}/django/contrib/redirects/locale/??/
 %dir %{python_sitelib}/django/contrib/redirects/locale/??_*/
 %dir %{python_sitelib}/django/contrib/redirects/locale/*/LC_MESSAGES
+%{python_sitelib}/django/contrib/redirects/*.py*
 %dir %{python_sitelib}/django/contrib/sessions/
 %dir %{python_sitelib}/django/contrib/sessions/locale/
 %dir %{python_sitelib}/django/contrib/sessions/locale/??/
 %dir %{python_sitelib}/django/contrib/sessions/locale/??_*/
 %dir %{python_sitelib}/django/contrib/sessions/locale/*/LC_MESSAGES
-%dir %{python_sitelib}/django/contrib/sitemaps/
+%{python_sitelib}/django/contrib/sessions/management/
+%{python_sitelib}/django/contrib/sessions/*.py*
+%{python_sitelib}/django/contrib/sitemaps/
 %dir %{python_sitelib}/django/contrib/sites/
 %dir %{python_sitelib}/django/contrib/sites/locale/
 %dir %{python_sitelib}/django/contrib/sites/locale/??/
 %dir %{python_sitelib}/django/contrib/sites/locale/??_*/
 %dir %{python_sitelib}/django/contrib/sites/locale/*/LC_MESSAGES
-%dir %{python_sitelib}/django/contrib/staticfiles/
-%dir %{python_sitelib}/django/contrib/syndication/
-%dir %{python_sitelib}/django/contrib/webdesign/
-%{python_sitelib}/django/contrib/*/*.py*
-%{python_sitelib}/django/contrib/*/fixtures/
-%{python_sitelib}/django/contrib/*/handlers/
-%{python_sitelib}/django/contrib/*/management/
-%{python_sitelib}/django/contrib/*/plugins/
-%{python_sitelib}/django/contrib/*/templates/
-%{python_sitelib}/django/contrib/*/templatetags/
-%{python_sitelib}/django/contrib/*/tests/
-%{python_sitelib}/django/contrib/*/views/
+%{python_sitelib}/django/contrib/sites/*.py*
+%{python_sitelib}/django/contrib/staticfiles/
+%{python_sitelib}/django/contrib/syndication/
+%{python_sitelib}/django/contrib/webdesign/
 %{python_sitelib}/django/contrib/gis/admin/
 %{python_sitelib}/django/contrib/gis/db/
 %{python_sitelib}/django/contrib/gis/forms/
 %{python_sitelib}/django/contrib/gis/gdal/
 %{python_sitelib}/django/contrib/gis/geometry/
 %{python_sitelib}/django/contrib/gis/geos/
+%{python_sitelib}/django/contrib/gis/management/
 %{python_sitelib}/django/contrib/gis/maps/
 %{python_sitelib}/django/contrib/gis/sitemaps/
+%{python_sitelib}/django/contrib/gis/templates/
+%{python_sitelib}/django/contrib/gis/tests/
 %{python_sitelib}/django/contrib/gis/utils/
-%{python_sitelib}/django/contrib/localflavor/generic/
-%{python_sitelib}/django/contrib/localflavor/in_/
-%{python_sitelib}/django/contrib/localflavor/is_/
 %{python_sitelib}/django/contrib/messages/storage/
 %{python_sitelib}/django/contrib/sessions/backends/
 %{python_sitelib}/django/forms/
@@ -314,8 +367,16 @@ cd tests
 %doc docs/_build/html/*
 %endif
 
+%if 0%{?with_python3}
+%files -n python3-django
+%{python3_sitelib}/
+%endif
+
 
 %changelog
+* Wed Feb 27 2013 Matthias Runge <mrunge at redhat.com> - 1.5-1
+- update to Django-1.5
+
 * Thu Feb 21 2013 Matthias Runge <mrunge at redhat.com> - 1.4.5-2
 - update to latest stable upstream version
 - fix minor packaging issues introduced upstream
diff --git a/sources b/sources
index e66a9ae..165c1f2 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-851d00905eb70e4aa6384b3b8b111fb7  Django-1.4.5.tar.gz
-b4248fa7ad744604b49b231eceb50f30  simplejson-init.py
+fac09e1e0f11bb83bb187d652a9be967  Django-1.5.tar.gz


More information about the scm-commits mailing list