[Pythonmac-SIG] py2app: how to include the entire standard library of modules?

Henning Hraban Ramm hraban at fiee.net
Sat Sep 29 21:38:01 CEST 2007


Am 2007-09-29 um 20:54 schrieb Nick Anderson:

> I am attempting to build a mac application using py2app. I need to
> include all of the standard modules even though the application does
> not import them expressly. (The end user will be able to write
> scripts, and if his script uses a standard module it needs to be
> available.) The only way I have found to do this is by using the -i
> argument:

You can set that up in your setup.py (sic!), but it's hard to find how.

The py2app docs are no help:
http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html
Documentation for py2exe is better (and mostly valid for py2app, too):
http://www.py2exe.org/
e.g. http://www.py2exe.org/index.cgi/PassingOptionsToPy2Exe

You can use the command line options in a dict like:

opts = {
	'py2app' : {
		'includes' : ('os', 'sys'),
	}
}

setup (
	options = opts
)

Did you try just to import all the modules in your main script?  
(Don't know if py2app optimizes that away...)


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net
https://www.cacert.org (I'm an assurer)




More information about the Pythonmac-SIG mailing list