Try to create a GHA with pyapp 0.29.0, to build a (embbeded) win/exe ... [RESOLVED]
INTRODUCE ME :
I'm working on http://github.com/manatlan/reqman ... I already release a windows executable, thru a GHA with pyinstaller. I've red this : https://www.infoworld.com/article/4030697/pyapp-an-easy-way-to-package-python-apps-as-executables.html and wanted to try the "pyapp" system (to replace the pyinstaller version) I'm not really a specialist of rust, of windows .. and GHA. So I asked gemini-pro(thru jules) to create a GHA for me, with pyapp 0.29.0: Here it is : https://github.com/manatlan/reqman/blob/master/.github/workflows/build_win_pyapp_test.yml
MY PROBLEM:
It's not working OOTB, see here:
https://github.com/manatlan/reqman/actions/runs/18615821245/job/53080192148
the relevant errors seems to be related to :
error: failed to run custom build command for `pyapp v0.29.0 (D:\a\reqman\reqman\pyapp-0.29.0)`
Caused by:
process didn't exit successfully: `D:\a\reqman\reqman\pyapp-0.29.0\target\release\build\pyapp-00a08bb2fffbcc62\build-script-build` (exit code: 101)
--- stdout
cargo:rustc-env=PYAPP_PROJECT_DEPENDENCY_FILE=
cargo:rustc-env=PYAPP__PROJECT_DEPENDENCY_FILE_NAME=
--- stderr
thread 'main' panicked at build.rs:645:13:
Project path is not a file: dist/reqman-0.0.0-py3-none-any.whl
Can anyone point me to the right direction ?
I've tested a lot of things ... but it won't ;-( latest errors are always the same (see https://github.com/manatlan/reqman/actions/runs/18616436704/job/53081561550):
thread 'main' panicked at build.rs:645:13:
Project path is not a file: .\reqman-0.0.0-py3-none-any.whl
But I can ensure that "reqman-0.0.0-py3-none-any.whl" is a file ;-)
you should change the message, because it's not helpful at all ;-)
When building the Cargo installation rather than the local repository method the paths must be absolute because the current directory is different.
Thanks @ofek I go further ... (https://github.com/manatlan/reqman/actions/runs/18616753187/job/53082335416)
Invalid project name ``; must only contain ASCII letters/digits, underscores, hyphens, and periods, and must begin and end with
I don't have further time to offer troubleshooting assistance but the project name is empty somehow. The call chain is as follows:
- https://github.com/ofek/pyapp/blob/9521dc908f547ba6676e4c0549cebff504b8cf15/build.rs#L666
- https://github.com/ofek/pyapp/blob/9521dc908f547ba6676e4c0549cebff504b8cf15/build.rs#L601
- https://github.com/ofek/pyapp/blob/9521dc908f547ba6676e4c0549cebff504b8cf15/build.rs#L457
Try printing out the contents of the embedded *.dist-info/METADATA file.
@ofek no problem !
I've reached to make it work, by forcing PYAPP_PROJECT_NAME: "reqman"
And it produces a windows executable : which works on win11 ! 🥇 (https://github.com/manatlan/reqman/actions/runs/18616988063)
Thanks a lot !
that's a great project !
EDIT: I've reached to embbed all my dependencies, and compress (with UPX).
So my win/exe size (py3.14 + pyapp 0.29.0 + (UPX or not) ) is 21Mb Compared to my pyinstaller version (py3.14 + pyinstaller latest + UPX) is 12.4Mb
There is a difference of 8Mb ;-(
is it possible to try to reduce more ?