[python-django] implement a better fix for simplejson unbundling/import.

Matthias Runge mrunge at fedoraproject.org
Wed Mar 28 08:03:08 UTC 2012


commit f2fb02ceb20d4e9a520094e2bd48a19b1c97d4c8
Author: Matthias Runge <mrunge at matthias-runge.de>
Date:   Wed Mar 28 10:01:45 2012 +0200

    implement a better fix for simplejson unbundling/import.

 python-django.spec |   21 ++++++++++++++-------
 simplejson-init.py |    1 +
 2 files changed, 15 insertions(+), 7 deletions(-)
---
diff --git a/python-django.spec b/python-django.spec
index 0f084ed..8607aef 100644
--- a/python-django.spec
+++ b/python-django.spec
@@ -91,10 +91,16 @@ done
 echo "<!-- nothing -->" > django/contrib/flatpages/tests/templates/registration/login.html
 
 # remove bundled simplejson (for tests)
-cd django/utils
-rm -rf simplejson
+#cd django/utils
+#rm -rf simplejson
 # and link to system module
-ln -s %{python_sitearch}/simplejson .
+#ln -s %{python_sitearch}/simplejson .
+# remove bundled simplejson (for tests)
+cd django/utils/simplejson
+rm -rf *
+# and put the replacement stub in place
+cp -p %{SOURCE1} __init__.py
+
 
 
 
@@ -139,10 +145,10 @@ chmod +x \
   $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
+#cd $RPM_BUILD_ROOT%{python_sitelib}/django/utils
+#rm -rf simplejson
 # and link to system module
-ln -s %{python_sitearch}/simplejson .
+#ln -s %{python_sitearch}/simplejson .
 
 
 %check
@@ -259,8 +265,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
-* Tue Mar 27 2012 Matthias Runge <mrunge at matthias-runge.de> - 1.4-3
+* Wed Mar 27 2012 Matthias Runge <mrunge at matthias-runge.de> - 1.4-3
 - revert change from 1.4-2
+- really fix simplejson-import
 
 * Tue Mar 27 2012 Matthias Runge <mrunge at matthias-runge.de> - 1.4-2
 - fix simplejson-import (port from django-1.3-package)
diff --git a/simplejson-init.py b/simplejson-init.py
index 060b3ca..55a3cfe 100644
--- a/simplejson-init.py
+++ b/simplejson-init.py
@@ -3,3 +3,4 @@ Stub simplejson library that just imports the version provided by the system
 """
 
 from simplejson import *
+from simplejson import __version__


More information about the scm-commits mailing list