from distutils.core import setup
import py2exe
options = {"py2exe":
{ "compressed": 1,
"optimize": 2,
"bundle_files": 1 # <span style="color: rgb(255, 128, 0); line-height: 15px; white-space: pre; background-color: rgb(253, 253, 253); ">所有文件打包成一个exe文件</span>
}
}
setup(
version = "1.0.0",
description = "description for your exe",
name = "hello",
options = options,
zipfile = None, # 不生成zip库文件
console = [{"script": "pyqt.py" }],
)
import py2exe
options = {"py2exe":
{ "compressed": 1,
"optimize": 2,
"bundle_files": 1 # <span style="color: rgb(255, 128, 0); line-height: 15px; white-space: pre; background-color: rgb(253, 253, 253); ">所有文件打包成一个exe文件</span>
}
}
setup(
version = "1.0.0",
description = "description for your exe",
name = "hello",
options = options,
zipfile = None, # 不生成zip库文件
console = [{"script": "pyqt.py" }],
)
2.win窗口
from distutils.core import setup
import py2exe
# Set options
options ={ 'py2exe':
{
'dll_excludes':['w9xpopen.exe'] #This file is for win9x platform
}
}
# Setup
setup ( options = options,
windows = [{
'script': 'test.py'
}]
)
import py2exe
# Set options
options ={ 'py2exe':
{
'dll_excludes':['w9xpopen.exe'] #This file is for win9x platform
}
}
# Setup
setup ( options = options,
windows = [{
'script': 'test.py'
}]
)
python setup.py py2exe