Open Faduf opened 1 week ago
Hmm. I cannot reproduce this issue. Any non-standard mounts maybe? On which filesystem(s) is/are your docker storage directories? We already had horrible issues on WSL2 mounts (https://github.com/webcomics/pywine/issues/16#issuecomment-1565655777), but you should receive a big, fat warning with such a setup (at least when launching the container through the default entrypoint...)
We have this on different Linux Debian 11 machines. The following docker run command is used :
docker run --rm --workdir=/tools -v $CI_PROJECT_DIR/tools:/tools --user $(id -u):$(id -g) tobix/pywine bash -xe $CI_JOB_NAME.sh
the script $CI_JOB_NAME.sh is used to install required python libraries, generate the .exe with PyInstaller and check the .exe sanity :
. /opt/mkuserwineprefix
export PYTHONDONTWRITEBYTECODE=1
wine pip3 install -r /$PYREQ_PATH
wine pyinstaller swupdate-client.py \
--collect-submodules websockets \
--workpath /tmp -F -y --clean
wine pyinstaller swupdate-archiver/swupdate_archiver.py \
--add-binary "/$CPIO_PATH/bin/*;." \
--workpath /tmp -F -y --clean
{ echo "swupdate_archiver: \$(wine dist/swupdate_archiver.exe -v)"
echo "swupdate-client: \$(wine dist/swupdate-client.exe -v)"
}>versions.manifest
Could you try with --noupx
or just --upx-exclude python312.dll
? Not sure what's the issue is with UPX, but it seems to conflict with Python 3.12 under wine...
(I'd suggest to disable UPX if you don't care that much about the final file size, since it often leads to false-positives with Anti-Virus software)
Both solutions (--noupx
or --upx-exclude python312.dll
) solve the issue. The final file size increases a bit but it is acceptable.
This seems similar to https://github.com/pyinstaller/pyinstaller/issues/1565 ... Strange that it only affects Wine...
We are using the official pywine docker from dockerhub to generate .exe binaries with PyInstaller inside the docker. At the end of our script we have a check by using
wine generated_binary.exe -v
to get the binary version. Since the update to Python 3.12, this command returns the following error :This can be reproduced with pywine:3.12 and pywine:latest (currently python 3.12.4).