On 14 Jan 18:37, Raphael Hertzog wrote:
> 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.
> 

We previously had a patched django-admin that did this, and went back to
putting the shebang to the default python... I'd rather it was left as
using the default python, and if people want to use a non default one
they either edit the files or run it using the other python. Open to
suggestion though.

Thanks,
-- 
Brett Parker



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to