Configuring installed py2exe and generate an executable file

2016-03-02 02:19:18

  1. Download the corresponding version of python py2exe setup and installation, refer to the website
  2. Complete the process of design debugging python source code to be run as a normal standard
  3. Write setup.py conversion script follows the example project working directory:
# mysetup.py
from distutils.core import setup
import py2exe
import sys

include = ["encodings","encodings.*"]
sys.argv.append("py2exe")
options = {
	"py2exe"	:	{
		"includes"		:	["sip"],
		"bundle_files"	:	3,
	},
}

setup(options=options,zipfile=None,console=[{"script" : "test.py","icon_resources" : [(1,"myIcon.ico")]}])

Follow the example parameters marked sense
to run after the completion of the script, you can generate exe files in the directory dist

Released three original articles · won praise 0 · Views 65

Guess you like

Origin blog.csdn.net/jk92103/article/details/104404844