Skip to content

Commit 49bf730

Browse files
DeeDeeGsavetheclocktower
authored andcommitted
Fix venv usage on Windows
1 parent 5d1f2af commit 49bf730

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,38 @@ jobs:
5656
with:
5757
python-version: '3.10'
5858

59-
- name: Install Python setuptools
59+
- name: Install Python setuptools (Unix-likes)
6060
# This is needed for Python 3.12+, since many versions of node-gyp
6161
# are incompatible with Python 3.12+, which no-longer ships 'distutils'
6262
# out of the box. 'setuptools' package provides 'distutils'.
63+
if: ${{ runner.os != 'Windows' }}
6364
run: |
6465
python3 -m venv CI_venv
6566
source CI_venv/bin/activate
6667
python3 -m pip install setuptools
6768
68-
- name: Install dependencies
69+
- name: Install Python setuptools (Windows)
70+
# This is needed for Python 3.12+, since many versions of node-gyp
71+
# are incompatible with Python 3.12+, which no-longer ships 'distutils'
72+
# out of the box. 'setuptools' package provides 'distutils'.
73+
if: ${{ runner.os == 'Windows' }}
74+
run: |
75+
python3 -m venv CI_venv
76+
CI_venv\Scripts\activate.bat
77+
python3 -m pip install setuptools
78+
79+
- name: Install dependencies (Unix-likes)
80+
if: ${{ runner.os != 'Windows' }}
6981
run: |
7082
source CI_venv/bin/activate
7183
npm install
7284
85+
- name: Install dependencies (Windows)
86+
if: ${{ runner.os == 'Windows' }}
87+
run: |
88+
CI_venv\Scripts\activate.bat
89+
npm install
90+
7391
- name: Lint
7492
run: npm run standard
7593

0 commit comments

Comments
 (0)