In article 
<cacayy8xelaakrvfvb63s4do4d+z_pkxhfg0ybkqrzspvsu1...@mail.gmail.com>,
 Michael Schmidt <elmicker...@gmail.com> wrote:

> Hi Everyone,
> 
> I'm trying to create a stand-alone app for some scientific analysis code
> using py2app, and I'm running into problems when I try to include scipy in
> my application (same goes for matplotlib).  As you can guess, this is a
> necessary pre-requisite for my app to be at all useful.  The documentation
> on the py2app site is a couple of years old now, and mailing list entries
> about the subject are from 2007, so I'm really hoping someone out there in
> the intertubes has succesfully packaged these into a stand-alone program.
> 
> The terminal commands look just fine when I do:
> 
> python --make_setup test_app.py
> python setup.py py2app
> 
> The problem only arises when I try to actually run the application.  I get
> an error window stating "test_app Error" and nothing else.
> 
> My sample code is attached.  I'm using Max OS 10.6.8, python version 2.6.1,
> numpy version 2.0.0, scipy version 0.9.0 and matplotlib version 1.0.0
> 
> My goal is to create a program that future grad students in my lab will be
> able to re-use - any help here would be much appreciated, and would further
> the progress of scientific inquiry (a lil' bit).
> 
> Thanks a bunch!
> Michael
> ---------------------------------------------------------------------

For matplotlib I specify matplotlib as a package for py2app. Here's the 
relevant bit of my setup.py:

inclModules = (
#    "email.Utils", # needed for Python 2.5
    "FileDialog",
)
# packages to include recursively
inclPackages = (
    "TUI",
    "RO",
    "matplotlib", # py2app already does this, but it doesn't hurt to 
insist
)

plist = Plist(
    CFBundleName                = appName,
    CFBundleShortVersionString  = shortVersStr,
    CFBundleGetInfoString       = "%s %s" % (appName, fullVersStr),
    CFBundleExecutable          = appName,
)

setup(
    app = [mainProg],
    setup_requires = ["py2app"],
    options = dict(
        py2app = dict (
            plist = plist,
            iconfile = iconFile,
            includes = inclModules,
            packages = inclPackages,
        )
    ),
)

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to