1

i use waf(https://waf.io/) as my build system ,
as not ervey my client want install the python , so I want try to convert it (python+waf+wscript) to exe file ,

first I try the pyinstaller ,

pyinstaller.exe -F waf

it give the error as follows:

D:\CX\wafexample\1_basic\15_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:\Users\XIA~1.CHE\AppData\Local\Temp\_MEI158042\waf.py'
[11540] Failed to execute script 'waf' due to unhandled exception!

then i try the nuitka , it gives as :

>waf.cmd configure build
Waf: Run from a folder containing a 'wscript' file (or try -h for the generic options)

this means nuitka convert python+waf to exe , but without the wscript.

can anyone can share how to convert python+waf+wscript to build.exe ? then i can use

 build.exe configure build 

to build a project ?

chenx319
  • 35
  • 5
  • The build.exe seems to work. The wscript is like a makefile. It's part of the sources, not the build command – neuro Apr 07 '22 at 15:31
  • yes, @nerro, you are right , but I wish that the build.exe can contain wscript – chenx319 Apr 09 '22 at 08:41
  • Late reply, but have you looked into Cython (https://cython.org/)? It's a superset of Python that compiles to C, so there's no need for a separate interpreter. I don't know if it supports Waf, but it's worth a shot. (and if you get it to work, I'd be interested to know) – user16978892 Apr 29 '22 at 22:59

1 Answers1

0

I know waf, but not nuitka. Just looking through the docs, it seems there's an option to include data files: --include-data-file. I think that's the way to go :)

Good luck!

neuro
  • 14,948
  • 3
  • 36
  • 59