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

Christopher Barker Chris.Barker at noaa.gov
Tue Jul 18 01:34:06 CEST 2006


OK,

As is usual with this stuff, I've figured it out. I poked into some of 
the py2app examples, and found one with py2app options set. Here's what 
works (at least with svn trunk, I haven't tried it with 0.3.1):

#!/usr/bin/env python2.4
"""
setup.py - script for building Simple CameoWeb test

Usage:
     % python setup.py py2app
"""
from distutils.core import setup
import py2app

setup(
     app = [dict(script = 'NumpyTest.py',
                 packages = ['numpy']
                 #plist = plist,
                 )],
      options=dict(py2app=dict(
           #includes=['testpkg.*'],
           packages=['numpy'],
      )),
         setup_requires=["py2app"],
)

What is "setup_requires" I just stuck it in there, as it was in all the 
examples.

Even if we don't get a recipe for all this, we should at least add 
something like this to the examples.

Note: I haven't done anything real with this, just a tiny sample. All I 
know is that numpy can be imported, and an array created.

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer
                                     		
NOAA/OR&R/HAZMAT         (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov


More information about the Pythonmac-SIG mailing list