From e84a60254c5bfcda8e7028ade4b99e8148a4b194 Mon Sep 17 00:00:00 2001 From: confused_techie Date: Wed, 13 Dec 2023 07:40:42 -0800 Subject: [PATCH 1/3] Manually install python and `setuptools` --- .github/workflows/CI.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b9abc750..a92550f9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -33,6 +33,16 @@ jobs: architecture: ${{ matrix.node_arch }} check-latest: true + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.12' + + - name: Install Python Dependencies + # This is needed for Python 3.12+, since node-gyp requires + # 'distutils', which has been removed + run: python3 -m pip install setuptools + - name: Install dependencies run: | # Yarn v1.x needs global node-gyp available if npm 9.7.2+ is the global npm version, From ab0e38b58e871eb12ca2948cd08ae6f754d0731d Mon Sep 17 00:00:00 2001 From: confused_techie Date: Wed, 13 Dec 2023 07:48:53 -0800 Subject: [PATCH 2/3] Continue default behavior for NodeJS v14 --- .github/workflows/CI.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a92550f9..87b95c76 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -34,15 +34,19 @@ jobs: check-latest: true - name: Setup Python + # NodeJS v14 can use the python included by the CI + if: ${{ matrix.node_version != 14 }} uses: actions/setup-python@v4 with: python-version: '3.12' - name: Install Python Dependencies + # NodeJS v14 doesn't have a newer copy of python, so we don't need to install deps + if: ${{ matrix.node_version != 14 }} # This is needed for Python 3.12+, since node-gyp requires # 'distutils', which has been removed run: python3 -m pip install setuptools - + - name: Install dependencies run: | # Yarn v1.x needs global node-gyp available if npm 9.7.2+ is the global npm version, From 8a6539680024e54406fe8cdc3c8550533cd205b3 Mon Sep 17 00:00:00 2001 From: confused_techie Date: Wed, 13 Dec 2023 08:00:41 -0800 Subject: [PATCH 3/3] Manual Python install for all CI --- .github/workflows/CI.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 87b95c76..d2b2dfe0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -40,6 +40,14 @@ jobs: with: python-version: '3.12' + - name: Setup Python (NodeJS v14) + # While initially tests would pass with no Python setup, additional testing + # is showing issues with CI included Python versions, so we will install our own + if: ${{ matrix.node_version == 14 }} + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Install Python Dependencies # NodeJS v14 doesn't have a newer copy of python, so we don't need to install deps if: ${{ matrix.node_version != 14 }}