From: David F. <da...@sj...> - 2004-06-29 14:59:17
|
I often use a setup script that is used for normal distributions as well as py2exe distributions I have added the ideas below to the wiki page, others may find it useful or have better ideas :-) http://starship.python.net/crew/theller/moin.cgi/PassingOptionsToPy2Exe 2 Avoid using setup parameters that are py2exe-specific Instead of passing options like console, windows to setup(), you can subclass Distribution and initialize them as follows: from distutils.core import Distribution class MyDistribution(Distribution): def __init__(self, attrs): self.com_server = [] self.services = [] self.windows = [] self.console = ['myapp'] self.zipfile = 'mylibrary.zip' Distribution.__init__(self, attrs) setup(distclass=Distribution) |