py2exe question
Larry Bates
larry.bates at websafe.com
Fri Feb 3 18:54:19 EST 2006
mitsura at skynet.be wrote:
> Hi,
>
> I just installed py2exe to create a binary of my Python script.
> However, py2exe does not seem to create a binary from my .py script.
> This is what I have done:
> I create a setup.py script:
> "
> # setup.py
> from distutils.core import setup
> import py2exe
>
> setup(name="APP1", scripts=["C:\\Python24\\_APP1.py"],)
> "
>
> I then ran "python setup.py py2exe"
> I see a lot of stuff scrolling on the screen. A 'built' directory is
> created. At the end I get a message saying that I may or may not need
> to include some DLL (all windows system DLLs). and that's it. No error
> message but also no binary.
>
> When I remove 'scripts=["C:\\Python24\\_APP1.py"]' from the setup.py
> file, I get exactly the same result. The same output, no error, no
> binary.
>
> Any idea what I am doing wrong here? Where should the compiled binary
> go?
>
> Any help much appreciated.
>
> Kris
>
The .exe, library and .pyd files are written to /dist subdirectory
not /built (sic).
You setup file should look something like:
The .exe, library and .pyd files are written to /dist subdirectory
not /built (sic).
from distutils.core import setup
import py2exe
setup(name="APPI",
windows=[{"script":"_APPI.py"}],
# or console= for console app
version="1.50",
options={"py2exe": {"compressed": 1,
"optimize": 2,
"bundle_files":1}},
)
If that doesn't help, you may want to post to the py2exe
specific newsgroup at gmain.comp.python.py2exe.
-Larry Bates
More information about the Python-list
mailing list