我使用waf(https://waf.io/)作为我的构建系统,
因为我的客户端不希望安装python,所以我想尝试将其(python+waf+wscript(转换为exe文件,
首先我尝试了pyinstaller,
pyinstaller.exe -F waf
它给出的错误如下:
D:CXwafexample1_basic15_Task_rule_exe>waf.exe
Traceback (most recent call last):
File "waf", line 162, in
wafdir = find_lib()
File "waf", line 159, in find_lib
unpack_wafdir(dir, src)
File "waf", line 59, in unpack_wafdir
f = open(src,'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:UsersXIA~1.CHEAppDataLocalTemp_MEI158042waf.py'
[11540] Failed to execute script 'waf' due to unhandled exception!
然后我尝试nuitka,它给出为:
>waf.cmd configure build
Waf: Run from a folder containing a 'wscript' file (or try -h for the generic options)
这意味着nuitka将python+waf转换为exe,但不包含wscript。
任何人都可以分享如何将python+waf+wscript转换为build.exe吗?然后我可以使用
build.exe configure build
建立一个项目?
我知道waf,但不知道nuitka。只要浏览一下文档,就可以选择包含数据文件:--include-data-file
。我认为这是要走的路:(
祝你好运!