[Pythonmac-SIG] Trying to make an app

Bob Ippolito bob at redivi.com
Wed Oct 6 16:46:18 CEST 2004


On Oct 6, 2004, at 10:36 AM, Steven Palm wrote:

>
> On Oct 5, 2004, at 10:02 PM, Bob Ippolito wrote:
>
>> As far as this package goes, I can't help you without more 
>> information.  Try it without packages or includes, it's supposed to 
>> do all that for you.
>
>  Well, most of the things included are resources for the program (data 
> files/etc) and need to be specifically included on Linux/Windows as 
> well. I overlooked the fact that for BundleBuilder this was a list of 
> tuples, so no wonder py2app was getting confused. :-(  Sorry about 
> that!
>
>  I fixed that, and now it launches but dies with a recursion error... 
> It may be related to not being able to find it's resource files 
> because it expects them to live in "Contents/Resources/resources", and 
> that's how I had BundleBuilder setting it up as well, but I can't 
> immediately see a way to get py2app to duplicate the tree.
>
>  They get copied like this:
>
>  copying ./resources/pblayout.xy -> BitPim.app/Contents/Resources
>
>  Any way to get py2app to preserve the original directory hierarchy?

One way is to specify the resources folder instead of every file in the 
resources folder.  The default tree copier in py2app is going to ignore 
.svn and CVS garbage that may be in there so it's usually fine to do.

Another way is to specify a list of tuples.. which should definitely 
work but I haven't really tried it myself.

setup(
     data_files=[('resources', ['./resources/pblayout.xy', ...]), ...],
     ...
)

-bob


More information about the Pythonmac-SIG mailing list