[Pythonmac-SIG] BundleBuilder and Paths to Modules

Bob Swerdlow rswerdlow at transpose.com
Tue Jun 3 12:04:35 EDT 2003


I'm building a PyObjC application using bundlebuilder.py as described at
http://pyobjc.sourceforge.net/doc/tutorial.php, but I can't figure out how
to get it to include modules from more than one directory.

The directory structure I want is this:
myproject/
    macui/
        myApp.py
    pyclient/
        clientclass.py

where macui has all the mac-specific stuff and pyclient has all the generic
client code.  In myApp.py, I have
    from clientclass import Client

>From the myproject directory, I run:

    python
$PYLIB/site-packages/PyObjC/bundlebuilder.py --link --nib=macui/MainMenu --m
ainprogram=macui/myApp.py --resource=macUI/MaineMenu.nib build

and it doesn't complain.  But when I do:

    ./macui/build/myApp.app/Contents/MacOS/maApp

I get this error:
    file "./macui/build/myApp.app/Contents/Resources/myApp.py", line 7 in ?
        from clientclass import Client
ImportError: No module named tasteprofileclass

I tried adding
    --include=pyclient/clientclass.py
to the bundlebuilder command but that did not help.

I tried
    setenv PYTHONPATH "./pyclient/ ./macui/"
before the bunderbuilder command, too, but that did not help either.

I cannot figure this out from the bundlebuilder usage listing.  Can you
please tell me how to include modules from other directories with
bundlebuilder?

Thanks!

Bob Swerdlow
COO
Transpose
rswerdlow at transpose.com
207-781-8284
http://www.transpose.com

----------------------------------
Fight Spam!
Add this link to your signature (as I did): http://wecanstopspam.org
Click through to find out more.
----------------------------------





More information about the Pythonmac-SIG mailing list