Skip to content

Commit 5dde2e1

Browse files
authored
Add native locator for finding pythons (#23208)
1 parent 12940e3 commit 5dde2e1

File tree

16 files changed

+795
-13
lines changed

16 files changed

+795
-13
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ runs:
2121
node-version: ${{ inputs.node_version }}
2222
cache: 'npm'
2323

24+
- name: Rust Tool Chain setup
25+
uses: dtolnay/rust-toolchain@stable
26+
2427
# Jedi LS depends on dataclasses which is not in the stdlib in Python 3.7.
2528
- name: Use Python 3.8 for JediLSP
2629
uses: actions/setup-python@v5
@@ -44,6 +47,10 @@ runs:
4447
run: nox --session install_python_libs
4548
shell: bash
4649

50+
- name: Build Native Binaries
51+
run: nox --session native_build
52+
shell: bash
53+
4754
- name: Run npm ci
4855
run: npm ci --prefer-offline
4956
shell: bash

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ dist/**
4848
*.xlf
4949
package.nls.*.json
5050
l10n/
51+
native_locator/target/**
52+
native_locator/Cargo.lock

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,8 @@
6767
"python_files/tests"
6868
],
6969
"python.testing.unittestEnabled": false,
70-
"python.testing.pytestEnabled": true
70+
"python.testing.pytestEnabled": true,
71+
"rust-analyzer.linkedProjects": [
72+
".\\native_locator\\Cargo.toml"
73+
]
7174
}

.vscodeignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,6 @@ test/**
6767
tmp/**
6868
typings/**
6969
types/**
70+
native_locator/src/**
71+
native_locator/target/**
72+
native_locator/Cargo.*

native_locator/Cargo.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[package]
2+
name = "python-finder"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[target.'cfg(windows)'.dependencies]
7+
winreg = "0.52.0"
8+
9+
[dependencies]
10+
serde = {version ="1.0.152", features = ["derive"]}
11+
serde_json = "1.0.93"
12+
serde_repr = "0.1.10"
13+
regex = "1.10.4"

0 commit comments

Comments
 (0)