On Mon, 14 Jan 2008, Filippo Giunchedi wrote: > > It's not automatic since you have to change the invocation of django-admin > > to give a special interpreter. :) > > > > And if you're doing something explicit like that you might as well just > > edit the generated file. > > Indeed, thinking about this I am more inclined to think about it as an > upstream > "bug" than a distribution one, how does this sound?
Of course, the django-admin script is not Debian-specific at all, it's provided by upstream. Feel free to forward in the upstream trac instance: http://code.djangoproject.com/simpleticket Nothing like that seems to be open: http://code.djangoproject.com/query?status=new&status=assigned&status=reopened&component=django-admin.py&order=priority > > How do you expect django-admin to know that it has been called by python > > or by python2.4 (when they are the same in Debian currently) ? > > Would it be necessary to know if django-admin is called by the standard > interpreter? Anyway, how about something like this? Well, in fact using sys.executable seems to be enough: $ cat test.py #!/usr/bin/env python import sys print sys.executable $ ./test.py /usr/bin/python $ python2.5 ./test.py /usr/bin/python2.5 $ python2.4 ./test.py /usr/bin/python2.4 So django-admin should update the shebang of manage.py with the value of sys.executable. (I was worried that we would have no reliable way to differentiate a call with a versioned interpreter from the call with the unversioned /usr/bin/python) Cheers, -- Raphaël Hertzog Le best-seller français mis à jour pour Debian Etch : http://www.ouaza.com/livre/admin-debian/