py2app, pythoncard build problems

Discussion in 'Python' started by loren.davie@gmail.com, May 2, 2006.

  1. Guest

    Hi,

    I'm attempting to build a small app that uses pythoncard for a gui
    layer. The intention is to use py2app to construct an .app bundle for
    the Mac. I'm running OS 10.4 on an Intel MacBook Pro. I'm using the
    default installed Python 2.3

    The .app bundle appears to build, but when I start up it fails -
    checking the console reveals that it can't find the "wx" package, as
    its called from some pythoncard code. (The app launches just fine in
    non-bundled form when I run it from the command line using pythonw).

    Not sure where to go with this. Any help would be greatly appreciated
    - thanks.
    , May 2, 2006
    #1
    1. Advertising

  2. Serge Orlov Guest

    wrote:
    > Hi,
    >
    > I'm attempting to build a small app that uses pythoncard for a gui
    > layer. The intention is to use py2app to construct an .app bundle for
    > the Mac. I'm running OS 10.4 on an Intel MacBook Pro. I'm using the
    > default installed Python 2.3
    >
    > The .app bundle appears to build, but when I start up it fails -
    > checking the console reveals that it can't find the "wx" package, as
    > its called from some pythoncard code. (The app launches just fine in
    > non-bundled form when I run it from the command line using pythonw).
    >
    > Not sure where to go with this. Any help would be greatly appreciated


    Most likely py2app analyzes code of pythoncard and cannot find
    dependance on wx. As a quick workaround you can just insert "import wx"
    in the beginning of your program where you import pythoncard. For a
    more flexible solution you will need to read py2app docs how to force
    bunding of a package from setup.py
    Serge Orlov, May 2, 2006
    #2
    1. Advertising

  3. James Stroud Guest

    wrote:
    > Hi,
    >
    > I'm attempting to build a small app that uses pythoncard for a gui
    > layer. The intention is to use py2app to construct an .app bundle for
    > the Mac. I'm running OS 10.4 on an Intel MacBook Pro. I'm using the
    > default installed Python 2.3
    >
    > The .app bundle appears to build, but when I start up it fails -
    > checking the console reveals that it can't find the "wx" package, as
    > its called from some pythoncard code. (The app launches just fine in
    > non-bundled form when I run it from the command line using pythonw).
    >
    > Not sure where to go with this. Any help would be greatly appreciated
    > - thanks.
    >


    Did you explicitly specify packages to bundle via the packages keyword?
    E.g.:

    setup(
    app=['%s.py' % appname],
    name=appname,
    options={'py2app' : {'strip': True,
    'packages': ['helptext',
    'tkHyperlinkManager',
    'rst2tkinter',
    'Crypto',
    'SecureRandom',
    'ResettableTimer'],
    'iconfile': '%s.icns' % appname,
    'argv_emulation' : True}}

    Jaems

    --
    James Stroud
    UCLA-DOE Institute for Genomics and Proteomics
    Box 951570
    Los Angeles, CA 90095

    http://www.jamesstroud.com/
    James Stroud, May 3, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Austin

    py2app on Mac OS X 10.3

    Austin, Dec 31, 2004, in forum: Python
    Replies:
    1
    Views:
    392
    Ronald Oussoren
    Dec 31, 2004
  2. Bob Swerdlow

    py2app can't find boot_app.py

    Bob Swerdlow, Mar 14, 2005, in forum: Python
    Replies:
    0
    Views:
    306
    Bob Swerdlow
    Mar 14, 2005
  3. bex

    OS X py2app confusion

    bex, Jul 25, 2005, in forum: Python
    Replies:
    1
    Views:
    449
  4. py2app and Bittornado

    , Aug 31, 2005, in forum: Python
    Replies:
    3
    Views:
    507
    Robert Kern
    Aug 31, 2005
  5. Richard Taylor

    problems using py2app

    Richard Taylor, Oct 10, 2005, in forum: Python
    Replies:
    0
    Views:
    371
    Richard Taylor
    Oct 10, 2005
Loading...

Share This Page