[Pythonmac-SIG] Trying to make an app
Bob Ippolito
bob at redivi.com
Wed Oct 6 21:45:13 CEST 2004
On Oct 6, 2004, at 3:04 PM, Steven Palm wrote:
> On Oct 6, 2004, at 12:04 PM, Bob Ippolito wrote:
>>> So the difference in invocation between the bundlebuuilder-built
>>> application bundle and the py2app-built application bundle is
>>> causing a problem with finding the path where we are being run from,
>>> at least in the way that BitPim is trying to find it in the above
>>> code. Anyway, that's something for me to worry about. ;^)
>>
>> Ok so don't do that! Your application is trying to be too tricky.
>> sys.path[0] is going to point to the os.path.dirname(sys.argv[0]),
>> which is the bootstrap executable. sys.path[1] is Resources, though.
>
> Well, this isn't *my* app, it's Roger Binns who is the main
> developer, I just pitch in to build Macintosh versions. He really on
> the whole abhors platform unique and is doing that too (I assume) deal
> with Windows and Linux in a consistent fashion. If it proves that
> py2app is the best Mac packaging solution, then it may also be
> required to change that initialization code to fit it.
I'll see if I can change sys.path[0] without breaking anything useful.
> On the other hand, the bundlebuilder process produces a 15MB package,
> while the py2app package is about 40MB, so maybe it's not time to
> switch yet until you are able to strip out unneeded parts of
> referenced modules.
Probably because the bundlebuilder process isn't embedding everything
it actually needs, or you're including too many packages explicitly
without reason. Either that or there's a WHOLE LOT of python code and
you should turn on zip compression. I can't know unless I can see a ls
-lR of what went in there or something. If I don't get this kind of
assistance from users like you then py2app will likely never suit your
needs, so don't throw it away yet .. it's probably a trivial fix.
>> You start in the Resources folder, so just do:
>> resourcedirectory='resources'
>
> Ah, but he is later using that as a base point for other paths...
> It's confusing, and obviously well outside of the scope of what py2app
> is responsible for. Now that you've educated me a bit more I'll work
> it out with Roger. ;-)
Well, you've confused me :)
-bob
More information about the Pythonmac-SIG
mailing list