Skip to content

Commit c23fca4

Browse files
authored
Ensure using python 3.6 when building VSIX with JediLSP (#16124)
* Ensure using python 3.6 when building VSIX with JediLSP * Fix builds * Fix pr-check * Clean up
1 parent 3e79ef2 commit c23fca4

4 files changed

Lines changed: 31 additions & 21 deletions

File tree

.github/actions/build-vsix/action.yml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,49 @@ outputs:
99
runs:
1010
using: 'composite'
1111
steps:
12-
# For faster/better builds of sdists.
13-
- run: python -m pip install wheel
12+
- name: Upgrade Pip
13+
run: python -m pip install -U pip
1414
shell: bash
1515

16-
- run: python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
16+
# For faster/better builds of sdists.
17+
- name: Install build pre-requisite
18+
run: python -m pip install wheel
1719
shell: bash
1820

19-
- run: |
20-
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/jedilsp --no-cache-dir --implementation py --platform any --abi none --no-deps --only-binary :all: --upgrade -r jedils_requirements.txt
21+
- name: Install python dependencies
22+
run: python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
2123
shell: bash
2224

23-
- run: |
25+
- name: Install debugpy
26+
run: |
2427
python -m pip --disable-pip-version-check install -r build/debugger-install-requirements.txt
2528
python ./pythonFiles/install_debugpy.py
2629
shell: bash
2730

28-
- run: npm ci --prefer-offline
31+
- name: Install Jedi LSP
32+
run: |
33+
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/jedilsp --no-cache-dir --implementation py --platform any --abi none --no-deps --only-binary :all: --upgrade -r jedils_requirements.txt
34+
shell: bash
35+
36+
- name: Run npm ci
37+
run: npm ci --prefer-offline
2938
shell: bash
3039

3140
# Use the GITHUB_RUN_ID environment variable to update the build number.
3241
# GITHUB_RUN_ID is a unique number for each run within a repository.
3342
# This number does not change if you re-run the workflow run.
34-
- run: npm run updateBuildNumber -- --buildNumber $GITHUB_RUN_ID
43+
- name: Update extension build number
44+
run: npm run updateBuildNumber -- --buildNumber $GITHUB_RUN_ID
3545
shell: bash
3646

37-
- run: npm run addExtensionDependencies
47+
- name: Update extension dependencies
48+
run: npm run addExtensionDependencies
3849
shell: bash
3950

40-
- run: npm run addExtensionPackDependencies
51+
- name: Update Optional extension dependencies
52+
run: npm run addExtensionPackDependencies
4153
shell: bash
4254

43-
- run: npm run package
55+
- name: Build VSIX
56+
run: npm run package
4457
shell: bash

.github/workflows/build.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,11 @@ jobs:
5555
with:
5656
node-version: ${{env.NODE_VERSION}}
5757

58-
- name: Use Python 3.x
58+
# Jedi LS depends on dataclasses which was a pypi install in 3.6
59+
- name: Use Python 3.6 for JediLSP
5960
uses: actions/setup-python@v2
6061
with:
61-
python-version: 3.x
62-
63-
- name: Upgrade pip
64-
run: python -m pip install -U pip
62+
python-version: 3.6
6563

6664
- name: Build VSIX
6765
uses: ./.github/actions/build-vsix

.github/workflows/pr-check.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,11 @@ jobs:
3232
with:
3333
node-version: ${{env.NODE_VERSION}}
3434

35-
- name: Use Python ${{env.PYTHON_VERSION}}
35+
# Jedi LS depends on dataclasses which was a pypi install in 3.6
36+
- name: Use Python 3.6 for JediLSP
3637
uses: actions/setup-python@v2
3738
with:
38-
python-version: ${{env.PYTHON_VERSION}}
39-
40-
- name: Upgrade pip
41-
run: python -m pip install -U pip
39+
python-version: 3.6
4240

4341
- name: Build VSIX
4442
uses: ./.github/actions/build-vsix

news/2 Fixes/16119.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Ensure that `dataclasses` is installed when using Jedi LSP.

0 commit comments

Comments
 (0)