makeExe.py
Premshree Pillai
premshree_python at yahoo.co.in
Tue Jan 27 08:48:02 EST 2004
> if you're interested
> in integrating the
> changes, and maintaining it, I'll forward our own
> script which you can
> pull apart and reuse as required...
I'd be interested in that.
--- Peter Hansen <peter at engcorp.com> wrote: >
Premshree Pillai wrote:
> >
> > Wrote a simple Python script that makes life a wee
> bit
> > easier when using py2exe:
> >
> > """
> > makeExe.py
> > - Simple Python script to automate the creation
> > of Python executables using py2exe.
> >
> [snip]
> > fp = open("setup.py","w")
> > temp = """from distutils.core import setup
> > import py2exe
> > setup(name = "%s",
> > scripts = ["%s"],
> > )""" % (package,fileName)
> > fp.write(temp)
> > fp.close()
>
> You could save yourself a fair bit of trouble, and
> avoid writing a
> "setup.py" file to the filesystem (possibly
> overwriting an existing
> one which might be important) by just calling the
> setup() method
> directly yourself. The only trick is that it checks
> sys.argv[] for
> the "py2exe" argument, so you have to fake that
> first:
>
> sys.argv[1:] = ['py2exe']
>
> from distutils.core import setup
> setup(name=package,
> scripts=[fileName])
>
> That should do the trick.... if you're interested
> in integrating the
> changes, and maintaining it, I'll forward our own
> script which you can
> pull apart and reuse as required...
>
> -Peter
> --
> http://mail.python.org/mailman/listinfo/python-list
=====
-Premshree
[http://www.qiksearch.com/]
________________________________________________________________________
Yahoo! India Mobile: Download the latest polyphonic ringtones.
Go to http://in.mobile.yahoo.com
More information about the Python-list
mailing list