py2exe question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mitsura@skynet.be

    #1

    py2exe question

    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="APP 1", 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

  • Larry Bates

    #2
    Re: py2exe question

    mitsura@skynet. be wrote:[color=blue]
    > 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="APP 1", 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
    >[/color]
    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="APP I",
    windows=[{"script":"_APP I.py"}],
    # or console= for console app
    version="1.50",
    options={"py2ex e": {"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.pyth on.py2exe.

    -Larry Bates

    Comment

    Working...