[Pythonmac-SIG] [Numpy-discussion] Packaging numpy with py2app

Bob Ippolito bob at redivi.com
Tue Jul 18 01:36:56 CEST 2006


On Jul 17, 2006, at 4:21 PM, Christopher Barker wrote:

>> On Jul 16, 2006, at 5:22 PM, Josh Marshall wrote:
>
>>> I managed to get it working again, which required:
>>> 1) Setting packages=['matplotlib','numpy'] in setup.py's options for
>>> py2app.
>
> where did you so this? I have this simple setup.py:
>
> #!/usr/bin/env python2.4
> """
> Usage:
>      % python setup.py py2app
> """
> from distutils.core import setup
> import py2app
>
> setup(
>      app = [dict(script = 'NumpyTest.py',
>                  packages = ['numpy']
>                  )],
>
>
> Have I added the packages in the wrong place? I get errors that look
> like this when I try to run it:

Wrong place.

setup(app=[...], options=dict(py2app=dict(packages=['numpy'])))

> Warning: unrecognized command line flag -psn_0_74448897

You might want to add argv_emulation to that py2app options dict. But  
that probably only works on PPC in 0.3.1 and may be entirely broken  
on both architectures in the trunk (new entirely untested argv  
emulation code).

> Bob Ippolito wrote:
>> That's a bug, but not the right fix. Trunk is fixed.
>
> I tried this with svn trunk too, and got the same results.

Well, your setup.py was broken. Barring a recipe for numpy, you'd  
have gotten the same results with any version of py2app.

> By the way, I tried building svn trunk with bdist_mpkg, and giving the
> resulting package to someone else, and it didn't work. It couldn't
> import py2app, and when I looked at waht was installed, it didn't look
> right.

Expected behavior. The mpkg isn't going to contain the dependencies  
(setuptools, altgraph, bdist_mpkg, macholib, modulegraph). Don't do  
that, use only easy_install/setuptools to install it. I probably  
won't "fix" that any time soon.

-bob


More information about the Pythonmac-SIG mailing list