栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

有没有办法为py2exe指定构建目录

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

有没有办法为py2exe指定构建目录

您可以在命令行上设置的任何选项都可以通过setup.cfg文件或setup.py文件进行设置。

-d
是一种快捷方式
--dist-dir
,您可以将其添加到传递给setup的options关键字param的字典中的py2xe dict
'dist_dir'

from distutils.core import setupimport py2exe# equivalent command line with options is:# python setup.py py2exe --compressed --bundle-files=2 --dist-dir="my/dist/dir" --dll-excludes="w9xpopen.exe"options = {'py2exe': {'compressed':1,  'bundle_files': 2, 'dist_dir': "my/dist/dir"'dll_excludes': ['w9xpopen.exe']}}setup(console=['myscript.py'], options=options)

您也可以将setup.cfg放在setup.py文件旁边:

[py2exe]compressed=1bundle_files=2 dist_dir=my/dist/dirdll_excludes=w9xpopen.exe

build目录(

--build-base
)是build命令的一个选项,因此您可以将其添加到以下一个配置文件(或setup.py)中:

[build]build_base=my/build/dir


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/648298.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号