@@ -364,15 +364,22 @@ jobs:
364364 # from the exe sibling dir (see steamworks/__init__.py), so dest stays at root.
365365 # Gate by RUNNER_OS: all platforms' libs are checked into the repo, but
366366 # feeding a Linux ELF .so to a macOS Nuitka build trips an arch-mismatch FATAL.
367+ # The --include-package=steamworks above also makes Nuitka pick up every
368+ # native lib in steamworks/ as package data, so strip the wrong-platform
369+ # copies from the source tree before invoking nuitka.
367370 NUITKA_OPTS="$NUITKA_OPTS --include-data-files=steam_appid.txt=steam_appid.txt"
368371 if [[ "$RUNNER_OS" == "macOS" ]]; then
372+ rm -f steamworks/SteamworksPy.so steamworks/libsteam_api.so \
373+ steamworks/SteamworksPy64.dll steamworks/steam_api64.dll steamworks/steam_api64.lib
369374 if [ -f "steamworks/libsteam_api.dylib" ]; then
370375 NUITKA_OPTS="$NUITKA_OPTS --include-data-files=steamworks/libsteam_api.dylib=libsteam_api.dylib"
371376 fi
372377 if [ -f "steamworks/SteamworksPy.dylib" ]; then
373378 NUITKA_OPTS="$NUITKA_OPTS --include-data-files=steamworks/SteamworksPy.dylib=SteamworksPy.dylib"
374379 fi
375380 elif [[ "$RUNNER_OS" == "Linux" ]]; then
381+ rm -f steamworks/SteamworksPy.dylib steamworks/libsteam_api.dylib \
382+ steamworks/SteamworksPy64.dll steamworks/steam_api64.dll steamworks/steam_api64.lib
376383 if [ -f "steamworks/libsteam_api.so" ]; then
377384 NUITKA_OPTS="$NUITKA_OPTS --include-data-files=steamworks/libsteam_api.so=libsteam_api.so"
378385 fi
@@ -437,6 +444,10 @@ jobs:
437444 rem from the exe sibling dir (see steamworks/__init__.py), so dest stays at root.
438445 rem Guard with `if exist` to mirror the Unix branch — keeps the build
439446 rem soft on incidental missing libs instead of fataling in Nuitka.
447+ rem --include-package=steamworks pulls in every native lib in steamworks/
448+ rem as package data; strip the non-Windows copies so Nuitka can't trip
449+ rem an arch check on them (mirrors the Unix branch's rm step).
450+ del /q steamworks\SteamworksPy.so steamworks\libsteam_api.so steamworks\SteamworksPy.dylib steamworks\libsteam_api.dylib 2>nul
440451 if exist "steamworks\steam_api64.dll" set NUITKA_OPTS=%NUITKA_OPTS% --include-data-files=steamworks/steam_api64.dll=steam_api64.dll
441452 if exist "steamworks\steam_api64.lib" set NUITKA_OPTS=%NUITKA_OPTS% --include-data-files=steamworks/steam_api64.lib=steam_api64.lib
442453 if exist "steamworks\SteamworksPy64.dll" set NUITKA_OPTS=%NUITKA_OPTS% --include-data-files=steamworks/SteamworksPy64.dll=SteamworksPy64.dll
0 commit comments