Skip to content

Fix: build script apply_patches.py relies on global system Python#116

Open
dfry-lhzn wants to merge 1 commit into
CCOMJHC:mainfrom
dfry-lhzn:fix/windows-patch-executable
Open

Fix: build script apply_patches.py relies on global system Python#116
dfry-lhzn wants to merge 1 commit into
CCOMJHC:mainfrom
dfry-lhzn:fix/windows-patch-executable

Conversation

@dfry-lhzn
Copy link
Copy Markdown

Resolves #115

When building LoggerFirmware on Windows, PlatformIO executes apply_patches.py. This script previously spawned a shell and explicitly invoked python, which expects the system's global $PATH to map to a compatible Python interpreter.

On some systems (particularly Windows), this can invoke the wrong interpreter, trigger the Microsoft Store 'Install Python' prompt, or error out.

Fix
By swapping the hardcoded python string for Python's own standard sys.executable, the script dynamically references the exact Python interpreter instance that PlatformIO is already running inside (e.g. .platformio/penv/Scripts/python.exe). This helps improve cross-platform robustness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build script apply_patches.py relies on global system Python

1 participant