[Python-modules-commits] r16864 - in packages/python-django/trunk/debian (changelog rules)
piotr at users.alioth.debian.org
piotr at users.alioth.debian.org
Mon May 2 20:27:21 UTC 2011
Date: Monday, May 2, 2011 @ 20:27:17
Author: piotr
Revision: 16864
* Team upload.
* Fix builds with non-default Python versions installed
Modified:
packages/python-django/trunk/debian/changelog
packages/python-django/trunk/debian/rules
Modified: packages/python-django/trunk/debian/changelog
===================================================================
--- packages/python-django/trunk/debian/changelog 2011-05-02 19:39:59 UTC (rev 16863)
+++ packages/python-django/trunk/debian/changelog 2011-05-02 20:27:17 UTC (rev 16864)
@@ -1,10 +1,16 @@
-python-django (1.3-2) UNRELEASED; urgency=low
+python-django (1.3-2) unstable; urgency=low
+ * Team upload.
+
+ [ Chris Lamb ]
* Don't remove "backup~" test file - upstream did ship it; we were just
removing it with dh_clean.
- -- Chris Lamb <lamby at debian.org> Thu, 24 Mar 2011 16:50:44 +0000
+ [ Piotr Ożarowski ]
+ * Fix builds with non-default Python versions installed
+ -- Piotr Ożarowski <piotr at debian.org> Mon, 02 May 2011 22:23:37 +0200
+
python-django (1.3-1) unstable; urgency=low
* New upstream release.
Modified: packages/python-django/trunk/debian/rules
===================================================================
--- packages/python-django/trunk/debian/rules 2011-05-02 19:39:59 UTC (rev 16863)
+++ packages/python-django/trunk/debian/rules 2011-05-02 20:27:17 UTC (rev 16864)
@@ -10,12 +10,7 @@
PREFIX = debian/python-django
-DJANGO_DIR = $(PREFIX)/$(call py_libdir_sh,`pyversions -d`)/django
-# FIXME: if the build is run while non-default python version are
-# available, the build process will install files in
-# /usr/lib/pyshared/pythonX.Y while we don't need them
-
%:
dh $@
@@ -46,14 +41,20 @@
override_dh_install:
dh_install
- # Use default shebang
- perl -pi -e 's|^#!/usr/bin/env python.*|#!/usr/bin/python|' $(DJANGO_DIR)/conf/project_template/manage.py
- chmod +x $(DJANGO_DIR)/conf/project_template/manage.py
-
- # Move scripts to /usr/lib/python-django
- mkdir -p $(PREFIX)/usr/lib/python-django
- mv $(DJANGO_DIR)/bin $(PREFIX)/usr/lib/python-django
-
+ # Use default shebang and m move scripts to /usr/lib/python-django
+ for ver in $(shell pyversions -vr); do \
+ FILE=$(PREFIX)/$(call py_libdir_sh,$$ver)/django/conf/project_template/manage.py; \
+ if [ -f $$FILE ]; then\
+ perl -pi -e 's|^#!/usr/bin/env python.*|#!/usr/bin/python|' $$FILE;\
+ chmod +x $$FILE;\
+ fi;\
+ if [ -d $(PREFIX)/usr/lib/python-django ]; then\
+ rm -rf $(PREFIX)/$(call py_libdir_sh,$$ver)/django/bin;\
+ else\
+ mkdir -p $(PREFIX)/usr/lib/python-django;\
+ mv $(PREFIX)/$(call py_libdir_sh,$$ver)/django/bin $(PREFIX)/usr/lib/python-django;\
+ fi;\
+ done
# Fix permissions
chmod 644 $(PREFIX)/etc/bash_completion.d/django_bash_completion
find $(PREFIX)/usr/lib/python-django/bin/ -name '*.py' -not -name '__init__.py' -print0 | xargs -0r chmod 755
More information about the Python-modules-commits
mailing list