[Pythonmac-SIG] (no subject)
Bob Ippolito
bob at redivi.com
Mon May 9 19:08:44 CEST 2005
On May 9, 2005, at 1:55 PM, Chris Barker wrote:
> Bob Ippolito wrote:
>
>> 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
>> way.
>
> I agree with this...I have NEVER used PYTHONPATH.
Which is the only sane thing to do if you ever have to mess with
multiple interpreters..
>> Perhaps it should ignore PYTHONPATH, but why?
>>
>
> For exactly the reason Konrad gave: An application bundle should
> run on
> anyone's system unchanged. The user should not have to know it is
> written in Python. So the issue is not whether The developer
> (Konrad, in
> this case) should use PYTHONPATH, but whether it's possible that
> someone
> that wants to run your application bundle is using it, and who the
> heck
> knows about that! A user might even have PYTHONPATH altered by some
> poorly designed application without their knowledge. The truth of the
> matter is that a lot of Python (and PYTHONPATH is part of this) was
> not
> designed from the start to be used to build distributable stand-along
> applications. Perhaps this will be made easier with Py3k some day, but
> in the meantime, I think it would be a great idea for Py2App to
> default
> to ignoring PYTHONPATH.
As far as the effects of PYTHONPATH is additive. It's just going to
search the PYTHONPATH in addition to places it would normally search.
You would have to really go out of the way to set PYTHONPATH in an
environment to where it mattered for double-click purposes (~/.MacOSX/
environment.plist). If you go through all that trouble, you really
should know what you're doing and what the repercussions are. You
might even be doing it on purpose to test an application with a newer
version of PyObjC than it was built with or something crazy like that.
In some cases people *do* want py2app to integrate with their
existing environment (site-packages, PYTHONPATH, etc.). It's simply
one of those things where you can't please everyone and I'll probably
have to add Yet Another Option. The question is whether the option
should be default or not (like --argv-emulation or --site-packages,
which I've decided are not default).
-bob
More information about the Pythonmac-SIG
mailing list