On Nov 18, 2014, at 09:39 AM, Brian May wrote:

>For another solution, have a look at django-admin, provided by the
>django-common package. You can call it using any of the following ways:
>
>brian@aquitard:~$ django-admin    # run as sh; autodetect python

Yep, that autodetect is clever.  Such a thing does often come up.

>brian@aquitard:~$ python2 /usr/bin/django-admin    # force python 2
>brian@aquitard:~$ python3 /usr/bin/django-admin    # force python 3

If a script is shebanged with one Python version or another, this is always
possible.  I use it in fact to run /usr/bin/python-coverage with a
virtualenv'd python.

>That way it works if only python-django is installed and it also works if
>only python3-django is installed.
>
>The ability to force a particular version of python may not be so useful
>for virtualenv however.

I don't think it is, since you can still create virtualenvs of whatever Python
you want with the -p option, regardless of what the virtualenv script is
shebanged.

The problem here is how to specify the package dependencies such that someone
who only has python-virtualenv installed in Wheezy, would automatically get
virtualenv in Jessie, for the /usr/bin script.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to