py2exe - change name of exe created

Thomas Heller theller at ctypes.org
Fri Sep 7 10:22:29 EDT 2007


imageguy schrieb:
> Sorry for the double post, sent it to quickly.
> 
> I have a setup script like this;
> 
> setup(windows = [{"script":"myprogram.py",
>                    "icon_resources":[(0,"nabbitt.ico")],
>                     "other_resources": [(24,1,manifest)]}
> ],
>                 name = "My Program ver 0.1",
>                 data_files = [("",rootdata)],
>                 zipfile = None,
>                 options = {"py2exe": {
>                                        "compressed" : 1,
>                                        "dll_excludes":
> ["w9xpopen.exe"],
>                                         "bundle_files": 3
>                                                 }
>                         },
>                 )
> 
> 
> Note that every thing works fine with this and creates an exe program
> called
> "myprogram.exe"
> 
> I would like to setup program to create an output called;
> "MyBestProgram.exe"
> 
> IS that at all possible ?

Yes.  Use a 'dest_base' key in the dictionary, like so:

> setup(windows = [{"script":"myprogram.py",
>                    "icon_resources":[(0,"nabbitt.ico")],
                     "dest_base": "MyBestProgram",
>                     "other_resources": [(24,1,manifest)]}
...

'dest_base' is the basename of the destination program that py2exe creates.

Thomas




More information about the Python-list mailing list