From 4b33cb68b6b14b2017f48b339cf3dc7561135a82 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Sat, 13 Dec 2025 18:04:15 +0300 Subject: [PATCH] CI: - Micropython-specific code from CPython-only branches --- .github/workflows/modified_scripts_build.yml | 62 +++++++------------- 1 file changed, 20 insertions(+), 42 deletions(-) diff --git a/.github/workflows/modified_scripts_build.yml b/.github/workflows/modified_scripts_build.yml index ffbf0ba7..71dd3cb3 100644 --- a/.github/workflows/modified_scripts_build.yml +++ b/.github/workflows/modified_scripts_build.yml @@ -121,33 +121,22 @@ jobs: pyenv --debug install ${{ matrix.python-version }} && rc=$? || rc=$? if [[ $rc -ne 0 ]]; then echo config.log:; cat $TMPDIR/python-build*/*/config.log; false; fi pyenv global ${{ matrix.python-version }} - # Micropython doesn't support --version - run: | #print version - if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then - python -c 'import sys; print(sys.version)' - else - python --version - python -m pip --version - fi - # Micropython doesn't support sys.executable, os.path, older versions even os + python --version + python -m pip --version - env: EXPECTED_PYTHON: ${{ matrix.python-version }} run: | #check - if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then - [[ $(pyenv which python) == "${{ env.PYENV_ROOT }}/versions/${{ matrix.python-version }}/bin/python" ]] || exit 1 - python -c 'import sys; assert sys.implementation.name == "micropython"' - else - python -c 'if True: - import os, sys, os.path - correct_dir = os.path.join( - os.environ["PYENV_ROOT"], - "versions", - os.environ["EXPECTED_PYTHON"], - "bin") - assert os.path.dirname(sys.executable) == correct_dir' - fi + python -c 'if True: + import os, sys, os.path + correct_dir = os.path.join( + os.environ["PYENV_ROOT"], + "versions", + os.environ["EXPECTED_PYTHON"], + "bin") + assert os.path.dirname(sys.executable) == correct_dir' # bundled executables in some Anaconda releases cause the post-run step to hang in MacOS - run: | pyenv global system @@ -245,30 +234,19 @@ jobs: pyenv --debug install ${{ matrix.python-version }} && rc=$? || rc=$? if [[ $rc -ne 0 ]]; then echo config.log:; cat $TMPDIR/python-build*/*/config.log; false; fi pyenv global ${{ matrix.python-version }} - # Micropython doesn't support --version - run: | #print version - if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then - python -c 'import sys; print(sys.version)' - else - python --version - python -m pip --version - fi - # Micropython doesn't support sys.executable, os.path, older versions even os + python --version + python -m pip --version - env: EXPECTED_PYTHON: ${{ matrix.python-version }} run: | #check - if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then - [[ $(pyenv which python) == "${{ env.PYENV_ROOT }}/versions/${{ matrix.python-version }}/bin/python" ]] || exit 1 - python -c 'import sys; assert sys.implementation.name == "micropython"' - else - python -c 'if True: - import os, sys, os.path - correct_dir = os.path.join( - os.environ["PYENV_ROOT"], - "versions", - os.environ["EXPECTED_PYTHON"], - "bin") - assert os.path.dirname(sys.executable) == correct_dir' - fi + python -c 'if True: + import os, sys, os.path + correct_dir = os.path.join( + os.environ["PYENV_ROOT"], + "versions", + os.environ["EXPECTED_PYTHON"], + "bin") + assert os.path.dirname(sys.executable) == correct_dir'