mkpg on OSX

I tried testing the OSX binaries I built Friday on my local OSX laptop
today, and had a problem with the mkpg installer

http://drop.io/xortel1/asset/matplotlib-0-99-0-rc1-py2-5-macosx10-5-zip

On the sage box I used to do the builds, the default python path that
the installer picks up is

  /Library/Python/2.5/site-packages

and this is where it put mpl when I ran the installer on my local box.
But then when I try and import matplotlib on my local box w/o
modifying the PYTHONPATH, I can't find it because my local python is
looking in

  /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/

Is one of these two locations preferable for the default? Is there a
way to inform bdist_mkpg of the desired install target? Is there any
notion of the right way to do things w/ python on OSX?

JDH

Hi,

I tried testing the OSX binaries I built Friday on my local OSX laptop
today, and had a problem with the mkpg installer

http://drop.io/xortel1/asset/matplotlib-0-99-0-rc1-py2-5-macosx10-5-zip

On the sage box I used to do the builds, the default python path that
the installer picks up is

/Library/Python/2.5/site-packages

and this is where it put mpl when I ran the installer on my local box.
But then when I try and import matplotlib on my local box w/o
modifying the PYTHONPATH, I can't find it because my local python is
looking in

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/

Is one of these two locations preferable for the default? Is there a
way to inform bdist_mkpg of the desired install target? Is there any
notion of the right way to do things w/ python on OSX?

From what I can tell /Library/Python/2.5/site-packages is the default. All I have in /Library/Frameworks are those such as Qt, CG and other things which I have installed. VirtualBox and PyQt both install to /Library/Python/2.5/site-packages

The README in /Library/Python/2.5/site-packages make reference to a site.py file for 'more information' on site packages. I am unsure what exactly is meant by this.

Might be worth seeing how PyQt or VirtualBox pull it off. Although I am unsure if the installer code for either is open source.

Regards, Freddie.

···

On 1 Aug 2009, at 18:43, John Hunter wrote:

Is one of these two locations preferable for the
default?

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/

is preferable.

The location depends on whether the user has a framework Python or a normal static Python installed. For GUI programs, a framework Python is preferable. For the Mac/README in the Python source distribution:

1. Why would I want a framework Python instead of a normal static Python?

···

--------------------------------------------------------------------------

The main reason is because you want to create GUI programs in Python. With the exception of X11/XDarwin-based GUI toolkits all GUI programs need to be run from a fullblown MacOSX application (a ".app" bundle).

(I'd like to add to this that X11/XDarwin-based GUI toolkits, such as PyGTK, also work fine with a framework Python).

Is there a way to inform bdist_mkpg of the desired install target?

From what I've seen, bdist_mpkg uses
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/
if the Python creating the package is a framework Python.

--Michiel

--- On Sat, 8/1/09, John Hunter <jdh2358@...149...> wrote:

From: John Hunter <jdh2358@...149...>
Subject: [matplotlib-devel] mkpg on OSX
To: "matplotlib development list" <matplotlib-devel@lists.sourceforge.net>
Date: Saturday, August 1, 2009, 1:43 PM
I tried testing the OSX binaries I
built Friday on my local OSX laptop
today, and had a problem with the mkpg installer

http://drop.io/xortel1/asset/matplotlib-0-99-0-rc1-py2-5-macosx10-5-zip

On the sage box I used to do the builds, the default python
path that
the installer picks up is

/Library/Python/2.5/site-packages

and this is where it put mpl when I ran the installer on my
local box.
But then when I try and import matplotlib on my local box
w/o
modifying the PYTHONPATH, I can't find it because my local
python is
looking in

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/

Is one of these two locations preferable for the
default? Is there a
way to inform bdist_mkpg of the desired install target? Is
there any
notion of the right way to do things w/ python on OSX?

JDH

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal
Reports 2008 30-Day
trial. Simplify your report design, integration and
deployment - and focus on
what you do best, core application coding. Discover what's
new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

No, /Library/Python/2.5/site-packages/ is the location that users can install third-party packages for the System Python (because one shouldn't touch /System/Library/.../site-packages/). If you use the System Python to install your package or run bdist_mpkg, it has configured its distutils to default to installing there. If you use the www.python.org build of Python, its default is still its internal /Library/Frameworks/.../site-packages/.

···

On 2009-08-02 00:18, Michiel de Hoon wrote:

Is one of these two locations preferable for the
default?

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/

is preferable.

The location depends on whether the user has a framework Python or a normal static Python installed. For GUI programs, a framework Python is preferable. For the Mac/README in the Python source distribution:

--
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