[Pythonmac-SIG] (no subject)

Ronald Oussoren ronaldoussoren at mac.com
Tue May 10 14:30:38 CEST 2005


On 10-mei-2005, at 11:14, konrad.hinsen at laposte.net wrote:

> Bob Ippolito writes:
>
>
>> Well, you might think that you have particularly good reasons to use
>> PYTHONPATH, but pth files can do the same thing in a more predictable
>>
>
> My particularly good reason is that I set PYTHONPATH differently in
> different shell environments for testing purposes. Changing links  
> and path
> files is a lot more work.
>
>
>> way.  Perhaps it should ignore PYTHONPATH, but why?  NOTHING else   
>> does.
>> It targets every single python interpreter in the system, why   
>> should this
>> be any different?
>>
>
> py2app makes a big effort to make the package independent of the  
> particular
> system environment on which it runs. PYTHONPATH is part of the system
> environment.
>
>  From a more pragmatic point of view, I don't see how respecting  
> PYTHONPATH
> could do anyone any good (except people who intentionally modify the
> behaviour of an installed package, but they usually know what they are
> doing), and it can do a lot of harm by executing different code  
> than the
> packager intended.
>
> In the worst case, a system administrator sets PYTHONPATH for whatever
> reason, and the user who clicks on an application doesn't even know  
> about
> it. He reports a crash to the developer who doesn't suspect  
> anything either.

The same is true for something like DYLD_FRAMEWORK_PATH. This might  
also be
useful for testing but can cause serious problems when you always set  
it. If you
set it globally random application bundles might no longer start.  
Someone who changes
a global search path needs to know what he's doing.

An option that tells py2app that PYTHONPATH should be ignored by the
created bundle would be nice to have.

Ronald



More information about the Pythonmac-SIG mailing list