[Python-modules-commits] [python-django] 01/02: Move {app, project}_template to python-django-common to prevent byte-compilation (via pycompile) on installation, causing failure. They are not valid Python files until variables have been interpolated.

Chris Lamb lamby at moszumanska.debian.org
Thu Nov 26 12:59:22 UTC 2015


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch debian/experimental
in repository python-django.

commit 09b84c2cf688d9ddcb166e6b0f51de50ffa8152b
Author: Chris Lamb <chris at chris-lamb.co.uk>
Date:   Thu Nov 26 14:43:51 2015 +0200

    Move {app,project}_template to python-django-common to prevent byte-compilation (via pycompile) on installation, causing failure. They are not valid Python files until variables have been interpolated.
---
 debian/changelog | 8 ++++++++
 debian/rules     | 7 ++++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 09f6911..9ceda1d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+python-django (1.9~rc2-2) UNRELEASED; urgency=medium
+
+  * Move {app,project}_template to python-django-common to prevent
+    byte-compilation (via pycompile) on installation, causing failure. They are
+    not valid Python files until variables have been interpolated.
+
+ -- Chris Lamb <lamby at debian.org>  Thu, 26 Nov 2015 14:42:28 +0200
+
 python-django (1.9~rc2-1) experimental; urgency=medium
 
   * New upstream release candidate.
diff --git a/debian/rules b/debian/rules
index 4cf803e..0002309 100755
--- a/debian/rules
+++ b/debian/rules
@@ -65,7 +65,8 @@ override_dh_install:
 
 override_dh_python3:
 	dh_python3
-	find debian/python3-django/usr/lib/python3/dist-packages/ -type f -not -name '*.py' | \
+	find debian/python3-django/usr/lib/python3/dist-packages/ \
+		\( -type f -not -name '*.py' \) -o \( -type d -path '*/django/conf/*_template' \) | \
 	(while read file; do \
 		relname=$${file##debian/python3-django/usr/lib/python3/dist-packages/}; \
 		reldirname=$$(dirname $$relname); \
@@ -73,10 +74,10 @@ override_dh_python3:
 		mv $$file debian/python-django-common/usr/share/python-django-common/$$reldirname/; \
 		ln -sf /usr/share/python-django-common/$$relname $$file; \
 		if test -e debian/python-django/usr/share/pyshared/$$relname; then \
-		    rm debian/python-django/usr/share/pyshared/$$relname; \
+		    rm -rf debian/python-django/usr/share/pyshared/$$relname; \
 		    ln -sf /usr/share/python-django-common/$$relname debian/python-django/usr/share/pyshared/$$relname; \
 		else \
-		    rm debian/python-django/usr/lib/python2.7/dist-packages/$$relname; \
+		    rm -rf debian/python-django/usr/lib/python2.7/dist-packages/$$relname; \
 		    ln -sf /usr/share/python-django-common/$$relname debian/python-django/usr/lib/python2.7/dist-packages/$$relname; \
 		fi \
 	done)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-django.git



More information about the Python-modules-commits mailing list