py2app on Mac OS X 10.3

Discussion in 'Python' started by Austin, Dec 31, 2004.

  1. Austin

    Austin Guest

    """
    Minimal setup.py example, run with:
    % python setup.py py2app
    """

    from distutils.core import setup
    import py2app
    setup(
    app = ['main.py'],
    )

    That is a sample code of wiki.
    I have a file 'main.py' and several sub-folders.
    After I execute 'pythonw setup.py py2exe', I see 2 folders, 'dist' & 'build'
    which is the same as py2exe.
    I open the 'dist' folder and see a file 'main'. Then I double-click the
    'main' and appeared the error message.
    'IOError:[Errno 2] No such file or directory:
    '/user/austin/Desktop/disk/main.app/Contents/Resources/log/eventlog.xml
    I feel so wildered because 'main.app' should be a file not a folder.

    I was wondering if some extra codes needed by setup.py
    Could anyone give me an advice?
    Thanks a lot.
    Austin, Dec 31, 2004
    #1
    1. Advertising

  2. On 31-dec-04, at 11:12, Austin wrote:

    > """
    > Minimal setup.py example, run with:
    > % python setup.py py2app
    > """
    >
    > from distutils.core import setup
    > import py2app
    > setup(
    > app = ['main.py'],
    > )
    >
    > That is a sample code of wiki.
    > I have a file 'main.py' and several sub-folders.
    > After I execute 'pythonw setup.py py2exe', I see 2 folders, 'dist' &
    > 'build'
    > which is the same as py2exe.
    > I open the 'dist' folder and see a file 'main'. Then I double-click the
    > 'main' and appeared the error message.
    > 'IOError:[Errno 2] No such file or directory:
    > '/user/austin/Desktop/disk/main.app/Contents/Resources/log/eventlog.xml
    > I feel so wildered because 'main.app' should be a file not a folder.


    It's an application bundle, which is a folder. All '.app'-s on OS X are
    folders, it is a neat way of bundling the application program and all
    data files it needs.

    >
    > I was wondering if some extra codes needed by setup.py
    > Could anyone give me an advice?


    What is 'eventlog.xml' supposed to be? If you're going to write to it,
    it is in the wrong location. If it is a datafile that is used by your
    application you should mention it in the setup.py script (the
    data_files argument).

    Ronald
    Ronald Oussoren, Dec 31, 2004
    #2
    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. Bob Swerdlow

    py2app can't find boot_app.py

    Bob Swerdlow, Mar 14, 2005, in forum: Python
    Replies:
    0
    Views:
    296
    Bob Swerdlow
    Mar 14, 2005
  2. bex

    OS X py2app confusion

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

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

    problems using py2app

    Richard Taylor, Oct 10, 2005, in forum: Python
    Replies:
    0
    Views:
    360
    Richard Taylor
    Oct 10, 2005
  5. SPE - Stani's Python Editor

    howto py2exe/py2app for self updating application

    SPE - Stani's Python Editor, Apr 22, 2006, in forum: Python
    Replies:
    3
    Views:
    384
    Tony Meyer
    Apr 23, 2006
Loading...

Share This Page