[Pythonmac-SIG] Problems on using py2app: how to add extra files?

Bob Ippolito bob at redivi.com
Sat Oct 21 02:41:34 CEST 2006


On 10/20/06, Chris Van Bael <chris.van.bael at gmail.com> wrote:
> Hi all,
>
> I'm the window maintainer of Childsplay(childsplay.sourceforge.net),
> and wanted to port it also to Mac.  But I got a problem with py2app.
>
> So my source directory looks a bit like this: (simplified)
> ConfParser.py
> childsplay.py
> setup.py
>
> In a terminal "python childsplay.py" runs just fine. (childsplay is
> btw a pygame app)
> The setup.py is the following:
> APP = ['childsplay.py']
> DATA_FILES = ['Confparser.py']
> OPTIONS = {'argv_emulation':True}
>
> setup(
>    app=APP,
>    data_files=DATA_FILES,
>    option={'py2app':OPTIONS},
>    setup_requires=['py2app'],
> )
>
> So standard generated setup.py, only ConfParser.py is added.
>
> Now when I make the app in alias mode, it works fine.
> However when I make it in normal mode, it complains that it cannot
> import the ConfParser.py file from childsplay.app/Contents/Resources.
> But when I go see into the app file/directory, it is there ?!
>
> Probably something very simple I'm doing wrong, but I really have no idea...

You got the case wrong for ConfParser.py

If your code has an "import ConfParser" statement you don't need to do
this though, it will automatically get picked up.

-bob


More information about the Pythonmac-SIG mailing list