Hi all,
A couple of addenda:
(1) It appears that modules included via the py2app 'includes'
option do not have their full dependencies added. I included a
handful of modules from my main package via the setup.py script:
setup_kws['options'] = {'py2app':{'includes':['mypackage.util',
'mypackage.other']}}
These modules do get included, but *none* of their dependencies do,
even though there are clear 'import' statements in each. I checked
out the dependency graph as output by the --graph option, and sure
enough, no dependencies other than 'os' (which is not imported by
the modules) are shown. Is this by design? I tried tracing through
the modulegraph code to check, but it doesn't seem that this is the
desired outcome.
I tried *directly* importing these modules from the main script that I
pass to the 'app' setup option, and still nothing! Sometimes there's
not a single entry in the dependency graph for a module that is
explicitly imported from the app script. This is confusing! What
circumstances could cause modulegraph to fail so utterly?
(2) It appears that any packages that I include via the py2app
'packages' option are copied verbatim from the *source*, not *build*
directory. E.g. my top-level package is called 'mypackage', and I
want to force all of it to be included in the py2app bundle, so I do
the following in the top-level setup.py file:
setup_kws['options'] = {'py2app':{'includes':['mypackage.util',
'mypackage.other']}}
Sorry, copy-paste error. I meant:
setup_kws['options'] = {'py2app':{'packages':['mypackage']}}
Now, there are a lot of C extensions to mypackage, and some
(distutils-supported) folder-structure transformations (thanks to
some 3rd party code that I've included). But at the end of the day,
the right structure gets put into build/lib.macosx[whatever].
However, for some reason what gets copied over into the app bundle
is the mypackage tree from the source dir, not from the build/lib
dir. Which includes hundreds of C source files, etc., and has the
wrong structure.
Anyone have any thoughts about these matters?
Thanks,
Zach Pincus
_______________________________________________
Pythonmac-SIG maillist - Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
_______________________________________________
Pythonmac-SIG maillist - Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig