Cliff Wells wrote: > > On Fri, 2008-04-11 at 19:06 -0500, Ian Bicking wrote: >> Cliff Wells wrote: >>> Is there a particular reason paster uses >>> >>> #!/usr/bin/python >>> >>> rather than >>> >>> #!/usr/bin/env python >>> >>> Having an absolute path to a system directory prevents symlinking a >>> different version of python in a user directory, ignores PATH, etc. In >>> short, it seems the wrong thing to do on Unix. >> It does what Setuptools does -- Paste itself doesn't create that shebang >> line. >> >> This is actually quite important for virtualenv scripts, as it's what >> selects the environment that you are running in. > > This bit me because I upgraded a hosting box to Python 2.5 but not all > the applications were ready for this. Each site has ~/bin as the first > item in PATH, so it was pretty trivial to simply add a symlink > to /usr/bin/python2.4 to this directory and have most applications pick > it right up and continue working. Unfortunately I had to patch paster > for all of the sites using Pylons since they were hard-coded > to /usr/bin/python (which was now python2.5). > > I'm not quite convinced that this is the absolute right way to do it. > Virtualenv could just as easily rely on PATH like every other Unix > application (and this gives the sys admin much better control, > especially in case of an upgrade).
Well, virtualenv uses PATH, but at a different level of abstraction -- by setting PATH you select the script, interpreter, etc., but they all form a cohesive whole. You don't mix and match things using PATH. I think this is a more sensible strategy generally, it's just not the strategy you've been using. In a virtualenv context you wouldn't have had any problem. So... I can only say that future people will not have this problem, but there's nothing that can be done about your problem. Except for you to update the #! lines, which clearly you'll have to do anyway. virtualenv is very much meant to keep working code working, and I think it does that. So there is a current answer to that problem. -- Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
