[Pythonmac-SIG] avoiding system's "easy-install.pth" with custom distribution

Nat Echols nathaniel.echols at gmail.com
Fri Sep 13 22:01:07 CEST 2013


On Tue, Sep 10, 2013 at 11:16 PM, Ned Deily <nad at acm.org> wrote:

> The behavior is the result of a feature added in 2.7 for Issue4865 which
> appends the site-packages directory for the Apple-supplied system Python
> to sys.path of a Python framework build.  With hindsight, I don't think
> this was a good idea and you are not the first to complain about it
> (see, for instance, Issue15048).


Wow, okay.

  It is late in the game to make a change like
> this in Python 2.7.x which is nearing the end of its supported life.
> It's not too late, IMO, to change current Python 3 before it becomes an
> issue;  it's not an issue yet because Apple has not yet shipped anything
> newer than Python 2.7.x.  Feel free to chime in on the bug tracker.
>

Unfortunately I am stuck with 2.7.x for the indefinite future, but since we
already maintain our own minor patches to the Python sources, I do not mind
adjusting this myself.

The path appends occur in the standard library "site" module.  You could
> patch it in your own interpreter to not include /Library/Python; you
> might be also be able to do it by supplying a "sitecustomize" module.
> See site.py for details.
>

Excellent, I'll try this.  Modifying sys.path on the fly as Chris suggests
is possible as well, although the PYTHONPATH erasure is actually handled by
shell scripts which actually launch the programs.

thanks,
Nat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20130913/e4f6c9e4/attachment.html>


More information about the Pythonmac-SIG mailing list