[Pythonmac-SIG] BundleBuilder help ?
Kevin Ollivier
kevino at tulane.edu
Mon Dec 8 22:16:22 EST 2003
Hi Steven,
Looking at the bitpim source, my guess is that this line is causing the
problem:
resourcedirectory=os.path.abspath(os.path.join(os.path.dirname(sys.argv[
0]), 'resources'))
Using sys.argv like this can cause problems on OS X, which sends some
extra args in when launched from the Finder. I'd suggest trying it with
the following:
resourcedirectory=os.path.abspath(os.path.join(sys.path[0]),
'resources'))
That is how I determine the root directory of my program, which runs on
Windows, Linux and Mac.
Thanks,
Kevin
On Dec 8, 2003, at 6:38 PM, Steven Palm wrote:
>
> I am trying to build a version of the bitpim project for distribution.
> It's on sourceforge as bitpim.sourceforge.net. It utilizes wxPython if
> that makes any difference...
>
> Anyway, I used the example "build.py" approach (the longer one) from
> this page:
>
> http://www.python.org/cgi-bin/moinmoin/BundleBuilder
>
> It created a build directory with an App bundle, but it doesn't run
> properly, even on the machine where it was created. I get this when
> building:
>
> Finding module dependencies
> /System/Library/Frameworks/Python.framework/Versions/2.3/lib/
> python2.3/plat-mac/Carbon/Controls.py:11: FutureWarning: hex/oct
> constants > sys.maxint will return positive values in Python 2.4 and
> up
> kDataBrowserClientPropertyFlagsMask = 0xFF000000
> Building 'build/BitPim.app'
> Copying files
> Adding Python modules
> Warning: couldn't find the following submodules:
> (Note that these could be false alarms -- it's not always
> possible to distinguish between "from package import submodule"
> and "from package import name")
> ? OverrideFrom23._Res
> ? javax.comm
> ? os.path
> Warning: couldn't find the following modules:
> ? clip_dndc
> ? cmndlgsc
> ? controls2c
> ? controlsc
> ? eventsc
> ? filesysc
> ? fontsc
> ? framesc
> ? gdic
> ? htmlhelpc
> ? imagec
> ? libusb
> ? mdic
> ? misc2c
> ? miscc
> ? printfwc
> ? pywintypes
> ? readline
> ? sizersc
> ? stattoolc
> ? streamsc
> ? utilsc
> ? win32con
> ? win32event
> ? win32file
> ? windows2c
> ? windows3c
> ? windowsc
> Done.
>
> This in console log when running:
>
> Traceback (most recent call last):
> File
> "/Users/n9yty/my_cvs/bitpim/bitpim/build/bitpim.app/Contents/
> Resources/bp.py", line 26, in ?
> gui.run(sys.argv)
> File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 330, in run
> m=MainApp(*args)
> File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 245, in
> __init__
> wxApp.__init__(self, redirect=False, useBestVisual=True)
> File
> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
> python2.3/site-packages/wxPython/wx.py", line 1951, in __init__
> _wxStart(self.OnInit)
> File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 269, in OnInit
> self.setuphelp()
> File "/Users/n9yty/my_cvs/bitpim/bitpim/gui.py", line 293, in
> setuphelp
> self.helpcontroller.AddBook(guihelper.gethelpfilename()+".htb")
> File "/Users/n9yty/my_cvs/bitpim/bitpim/guihelper.py", line 167, in
> gethelpfilename
> assert False
> AssertionError
>
> Here is my build script:
>
> import bundlebuilder, os
> packageroot = "/Users/n9yty/my_cvs/bitpim/bitpim"
> myapp = bundlebuilder.AppBuilder(verbosity=1)
> myapp.mainprogram = os.path.join(packageroot, "bp.py")
> myapp.standalone = 1
> myapp.name = "bitpim"
> myapp.resources.append(os.path.join(packageroot, "help"))
> myapp.libs.append("/usr/local/lib/libwx_mac-2.4.0.dylib")
> myapp.libs.append("/usr/local/lib/libwx_mac-2.4.0.rsrc")
> myapp.setup()
> myapp.build()
>
> -. ----. -.-- - -.--
> Steve Palm - n9yty at n9yty.com
> -. ----. -.-- - -.--
>
>
> _______________________________________________
> Pythonmac-SIG maillist - Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
>
More information about the Pythonmac-SIG
mailing list