[EMAIL PROTECTED] wrote:
>
>Pretty much all the Webware and 3rd party plug-ins invoke the Python
>interpreter by calling "#!/usr/bin/env python" in their scripts. The
>trouble with this is that this call brings up Python 1.5.2 in Debian.

Only if you have the path to Python 1.5.2 before the path to other Python 
versions, or you have done a "make altinstall" with those versions, so that 
Python 2.0 (for example) is installed as python20.

>The only ways I can think of to get Python 2 invoked instead is to use the
>Debian alternatives system, or else search through all Webware + plug-in
>code to change "#!/usr/bin/env python" --> "#!/usr/bin/env python2".

What I have done is to have Python 2.0 installed in /usr/local, thus retaining 
the Red Hat default of Python 1.5.2 (or whatever it is) in /usr. Then, I change 
my environment to find Python 2.0 first - this usually involves changing 
one's .bashrc file on Linux:

  export PATH=/usr/local/bin:${PATH}

Or something like that. All "#!/usr/bin/env python" at the top of a script does 
is force the operating system to find the python program as if you had 
typed "python" at the shell prompt. Otherwise, one would have to hard code the 
path to python in instead - I have seen numerous Perl scripts 
with "#!/usr/bin/perl" at the top, for example.

>Neither option seems good. Messing with the Webware code means that I can't
>keep current easily. Using the alternatives system to point /usr/bin/python
>at python2 will break some Debian packages that depend on 1.5.2, and which
>rely on /usr/bin/python to point to Python 1.5.2.

Don't change any code - just change your environment! If you need to run any 
special Debian programs alongside Webware then I'd suggest creating a new user 
just for Webware. After all, you're using a multi-user operating system. ;-)

Another option is to create a start-up script which wraps up AppServer. In 
this, you could put your environment changes:

  #!/bin/sh

  PATH=/usr/local/bin:${PATH} ./AppServer

>So, if you use Debian, Webware and Python2, how did you manage to keep the
>balls in the air at once?

I use Red Hat, as I noted above, but the issue is pretty much the same. Well, 
apart from the assertion that Debian's package system sucks less than Red 
Hat's, but then I'd rather build from source anyway - it doesn't take me long 
to find that the configuration of a packaged version of some software doesn't 
suit me, thus demanding a reconfigure and a recompile.

Regards,

Paul

P.S. Should this go on the Wiki too?

-- 
Get your firstname@lastname email for FREE at http://Nameplanet.com/?su

_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to