List Info

Thread: py2app: how to include the entire standard library of modules?




py2app: how to include the entire standard library of modules?
user name
2007-09-29 13:54:03
Hello:

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:

python setup.py py2app -i "THE NAMES OF ALL MODULES
SEPARATED BY A COMMA"

I guess I could write a shell script that contains the above
command
but is there an easier way?
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIGpython.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: py2app: how to include the entire standard library of modules?
country flaguser name
Germany
2007-09-29 14:38:01
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/inde
x.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)


_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIGpython.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )