[python-django] Update to 1.4
Michel Alexandre Salim
salimma at fedoraproject.org
Sun Mar 25 12:58:10 UTC 2012
commit 4af55f74881277547ba896525cb34d752175b85a
Author: Michel Alexandre Salim <salimma at fedoraproject.org>
Date: Sun Mar 25 19:52:48 2012 +0700
Update to 1.4
.gitignore | 2 +-
python-django.spec | 78 +++++++++++++++++++++++++++++++--------------------
simplejson-init.py | 5 ---
sources | 2 +-
4 files changed, 49 insertions(+), 38 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 9678788..12a114b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/Django-1.3.1.tar.gz
+/Django-1.4.tar.gz
diff --git a/python-django.spec b/python-django.spec
index 8bc3ed6..59b9961 100644
--- a/python-django.spec
+++ b/python-django.spec
@@ -1,31 +1,32 @@
%{!?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[:3]")}
%global pkgname Django
+
+# Tests requiring Internet connections are disabled by default
+# pass --with internet to run them (e.g. when doing a local rebuild
+# for sanity checks before committing)
+%bcond_with internet
+
# one higher than the last Django release, to account for
# dist tags
%global obs_ver 1.3.1-5
Name: python-django
-Version: 1.3.1
-Release: 9%{?dist}
+Version: 1.4
+Release: 1%{?dist}
Summary: A high-level Python Web framework
Group: Development/Languages
License: BSD
URL: http://www.djangoproject.com/
-Source0: http://media.djangoproject.com/releases/1.3/Django-%{version}.tar.gz
-# stub simplejson module that imports the system version
-Source1: simplejson-init.py
-# upstream post-1.3.1 patches for building against Sphinx >= 1.1
-# https://code.djangoproject.com/changeset/16223
-Patch0: django-1.3.1-sphinx-table_row_index.patch
-Patch1: django-1.3.1-sphinx-param_separator.patch
-# upstream post-1.3.1 patch, fixing a test that only works in 2011
-Patch2: django-1.3.1-test-week_view_allow_future.patch
+Source0: http://pypi.python.org/packages/source/D/Django/Django-%{version}.tar.gz
# patch tests to skip tests requiring internet connection
-Patch3: django-1.3.1-no-internet-connection-tests.patch
+Patch0: Django-1.4-no-internet-connection-tests.patch
+# patch tests to relax performance scalability requirements
+Patch1: Django-1.4-relax-scalability-req.patch
%if 0%{?rhel} <= 5
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -71,24 +72,29 @@ Python Web framework.
%prep
%setup -q -n %{pkgname}-%{version}
-%patch0 -p1 -b .sphinx-table_row_index
-%patch1 -p1 -b .sphinx-param_separator
-%patch2 -p1 -b .test-week_view_allow_future
-
+%if ! %{with internet}
# patch tests to skip tests requiring internet connection
-%patch3
+%patch0 -p1 -b .no-internet-connection-tests
+%endif
+# patch tests to relax performance scalability requirements
+%patch1 -p1 -b .relax-scalability-req
# empty files
-echo "# just a comment" > django/contrib/markup/models.py
-echo "# just a comment" > django/contrib/webdesign/models.py
-echo "# just a comment" > django/contrib/staticfiles/models.py
+for f in \
+ django/contrib/humanize/models.py \
+ django/contrib/markup/models.py \
+ django/contrib/staticfiles/models.py \
+ django/contrib/webdesign/models.py \
+; do
+ echo "# just a comment" > $f
+done
echo "<!-- nothing -->" > django/contrib/flatpages/tests/templates/registration/login.html
-# remove bundled simplejson
-cd django/utils/simplejson/
-rm -rf *
-# and put the replacement stub in place
-cp -p %{SOURCE1} __init__.py
+# remove bundled simplejson (for tests)
+cd django/utils
+rm -rf simplejson
+# and link to system module
+ln -s %{python_sitearch}/simplejson .
%build
@@ -128,11 +134,16 @@ find $RPM_BUILD_ROOT -name "*.po" | xargs rm -f
# Fix permissions
chmod +x \
- $RPM_BUILD_ROOT%{python_sitelib}/django/conf/project_template/manage.py \
- $RPM_BUILD_ROOT%{python_sitelib}/django/contrib/admin/media/js/compress.py \
- $RPM_BUILD_ROOT%{python_sitelib}/django/bin/profiling/gather_profile_stats.py*
+ $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
+
+# remove bundled simplejson
+cd $RPM_BUILD_ROOT%{python_sitelib}/django/utils
+rm -rf simplejson
+# and link to system module
+ln -s %{python_sitearch}/simplejson .
+
-# test section
%check
export PYTHONPATH=$(pwd)
export LANG=en_US.utf8
@@ -167,15 +178,17 @@ rm -rf $RPM_BUILD_ROOT
%dir %{python_sitelib}/django/contrib/
%{python_sitelib}/django/contrib/*.py*
%dir %{python_sitelib}/django/contrib/admin/
+%{python_sitelib}/django/contrib/admin/static/
%dir %{python_sitelib}/django/contrib/admindocs/
%dir %{python_sitelib}/django/contrib/auth/
%dir %{python_sitelib}/django/contrib/comments/
%dir %{python_sitelib}/django/contrib/contenttypes/
-%dir %{python_sitelib}/django/contrib/csrf/
%dir %{python_sitelib}/django/contrib/databrowse/
%dir %{python_sitelib}/django/contrib/flatpages/
%dir %{python_sitelib}/django/contrib/formtools/
+%{python_sitelib}/django/contrib/formtools/wizard/
%dir %{python_sitelib}/django/contrib/gis/
+%{python_sitelib}/django/contrib/gis/geoip/
%dir %{python_sitelib}/django/contrib/humanize/
%dir %{python_sitelib}/django/contrib/localflavor/
%dir %{python_sitelib}/django/contrib/markup/
@@ -191,7 +204,6 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitelib}/django/contrib/*/fixtures/
%{python_sitelib}/django/contrib/*/handlers/
%{python_sitelib}/django/contrib/*/management/
-%{python_sitelib}/django/contrib/*/media/
%{python_sitelib}/django/contrib/*/plugins/
%{python_sitelib}/django/contrib/*/templates/
%{python_sitelib}/django/contrib/*/templatetags/
@@ -207,6 +219,7 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitelib}/django/contrib/gis/sitemaps/
%{python_sitelib}/django/contrib/gis/utils/
%{python_sitelib}/django/contrib/localflavor/??/
+%{python_sitelib}/django/contrib/localflavor/??_??/
%{python_sitelib}/django/contrib/localflavor/generic/
%{python_sitelib}/django/contrib/localflavor/in_/
%{python_sitelib}/django/contrib/localflavor/is_/
@@ -245,6 +258,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Sun Mar 25 2012 Michel Salim <salimma at fedoraproject.org> - 1.4-1
+- Update to 1.4
+
* Mon Mar 19 2012 Matthias Runge <mrunge at matthias-runge.de> - 1.3.1-9
- spec cleanup
diff --git a/sources b/sources
index ace4bcc..f210841 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-62d8642fd06b9a0bf8544178f8500767 Django-1.3.1.tar.gz
+ba8e86198a93c196015df0b363ab1109 Django-1.4.tar.gz
More information about the scm-commits
mailing list