From 5ee3bb9d7ba77f714e7afacd8656b8460ec1c584 Mon Sep 17 00:00:00 2001 From: dromer Date: Wed, 12 Feb 2025 10:27:27 +0100 Subject: [PATCH] detect MingW environment in c2js --- CHANGELOG.md | 2 +- hvcc/generators/c2js/c2js.py | 3 ++- tox.ini | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5d62dd0..b5d8d47b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ Bugfixes: * Daisy: add ScopedIrqBlocker to several functions. Should fix midi input issues and potentially others. * Daisy: use FIFO to buffer midi TX messages and call them in the main loop instead of during process() - +* JS: Ignore windows batch if inside of MingW environment 0.13.2 ----- diff --git a/hvcc/generators/c2js/c2js.py b/hvcc/generators/c2js/c2js.py index 5acabc39..98989063 100644 --- a/hvcc/generators/c2js/c2js.py +++ b/hvcc/generators/c2js/c2js.py @@ -80,7 +80,8 @@ def run_emscripten( """Run the emcc command to compile C source files to a javascript library. """ - if os.name == 'nt': + # Detect Windows OS, but ignore if running in MingW + if os.name == 'nt' and os.environ.get('MSYSTEM') is None: emcc_path = which("emcc.bat") else: emcc_path = which("emcc") diff --git a/tox.ini b/tox.ini index e6e58d8e..80dc79f9 100644 --- a/tox.ini +++ b/tox.ini @@ -37,8 +37,8 @@ commands = [run] ignore = examples/* cov-report = html,term -omit = .tox/*,venv/*,tests/*,examples/*,setup.py +omit = .tox/*,.venv/*,venv/*,tests/*,examples/*,setup.py [flake8] max-line-length = 120 -exclude = .tox,venv,build,examples +exclude = .tox,.venv,venv,build,examples