I'm distributing a large cross-platform Python-based application, for which we bundle Python 2.7 and a number of dependencies (wxPython, matplotlib, etc.). We've tried to make it as self-contained as possible, to prevent either a) polluting the user's environment and potentially breaking other programs, or b) breaking our program because other software pollutes the environment. This means wiping out PYTHONPATH at runtime, which has worked quite well for us.
What I've now discovered is that at least on OS 10.7.5, if a user installs packages for the system python using easy_install (possibly other mechanisms as well, but that's what "worked" for me), these will now end up in the search path for our app's python interpreter, and override many of the packages we distribute because they appear relatively early in sys.path. The problem appears to be traceable to this file: /Library/Python/2.7/site-packages/easy-install.pth which modifies sys.path directly. Removing or renaming that file leaves our custom distribution's path alone. So, two questions: 1) Why is this happening? It seems incredibly broken - but I have no idea who's fault it is, for all I know we're doing something foolish when we compile Python on our build system (10.6, if it matters). 2) Is there any way we can modify our distribution to avoid this? thanks, Nat
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org https://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG