[Numpy-discussion] 1.2.0rc1 tagged!

Robert Kern robert.kern@gmail....
Wed Sep 10 15:38:36 CDT 2008

On Wed, Sep 10, 2008 at 15:28, Christopher Barker <Chris.Barker@noaa.gov> wrote:
> Robert Kern wrote:
>> Yes. It is difficult (or impossible without writing new code) to build
>> these kinds of installers to work with different locations of Python
>> frameworks.
> yup. however, perhaps the approach taken by wxPython would be worth
> considering. Robin is putting the whole package in:
> /usr/local/lib/wxPython-unicode-
> Then putting a *.pth file in both /Library and /System pythons so that
> it will work with either install of 2.5. It seems it would be easy to
> add Enthought's too, though I have no idea where Enthought puts it.

We're in /Library/Frameworks/Python.framework/..., too, just with a
different version number to keep the installations separate.

> Actually, perhaps we should try to establish a standard, putting
> packages that work with multiple pythons in something like:
> /usr/local/lib/UniversalPython2.5/site-packages
> and add that to a *.pth file in various versions.

The problem is that each Python has to support this. If each package
has to drop in a .pth file to hack in support for this, it'll just be
a shambles.

It's possible that /Library/Python/2.x/site-packages was designed for
this, but I more strongly suspect that it was just a place outside of
/System for third-party packages for the /System Python to go, and it
was not intended to be used by any other Python.

> Note that Robin put:
> import site;
> site.addsitedir('/usr/local/lib/wxPython-unicode-')
> in the pth file, rather than just the path -- I have no idea why.

Because it, too, has a .pth file. Python only reads .pth files in
paths that it knows about. site.addsitedir() registers such paths.

This is not a path (and my sincerest apologies for the pun) that I
would like to go down.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco

More information about the Numpy-discussion mailing list