[Python-modules-commits] r29836 - in packages/python-django/trunk/debian (django-admin)
bam at users.alioth.debian.org
bam at users.alioth.debian.org
Mon Jul 21 00:40:02 UTC 2014
Date: Monday, July 21, 2014 @ 00:40:02
Author: bam
Revision: 29836
Fix python autodetection.
Modified:
packages/python-django/trunk/debian/django-admin
Modified: packages/python-django/trunk/debian/django-admin
===================================================================
--- packages/python-django/trunk/debian/django-admin 2014-07-21 00:22:10 UTC (rev 29835)
+++ packages/python-django/trunk/debian/django-admin 2014-07-21 00:40:02 UTC (rev 29836)
@@ -1,10 +1,18 @@
#!/bin/sh
sh=''''
# shell code
-if command -v python3 > /dev/null; then
- exec python3 "$0" "$@"
+if test -x /usr/bin/python3 && test -e /usr/lib/python3/dist-packages/django/bin/django-admin.py
+then
+ exec python3 /usr/lib/python3/dist-packages/django/bin/django-admin.py "$@"
+elif test -x /usr/bin/python2.7 && test -e /usr/lib/python2.7/dist-packages/django/bin/django-admin.py
+then
+ exec python2.7 /usr/lib/python2.7/dist-packages/django/bin/django-admin.py "$@"
+elif test -x /usr/bin/python2.6 && test -e /usr/lib/python2.6/dist-packages/django/bin/django-admin.py
+then
+ exec python2.6 /usr/lib/python2.6/dist-packages/django/bin/django-admin.py "$@"
else
- exec python "$0" "$@"
+ echo "Cannot find installed version of python-django or python3-django." >&2
+ exit 1
fi
' '''
More information about the Python-modules-commits
mailing list