forked from microsoft/vscode-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
noxfile.py
50 lines (43 loc) · 1.19 KB
/
noxfile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import pathlib
import nox
import shutil
@nox.session()
def install_python_libs(session: nox.Session):
requirements = [
("./pythonFiles/lib/python", "./requirements.txt"),
(
"./pythonFiles/lib/jedilsp",
"./pythonFiles/jedilsp_requirements/requirements.txt",
),
]
for target, file in requirements:
session.install(
"-t",
target,
"--no-cache-dir",
"--implementation",
"py",
"--no-deps",
"--require-hashes",
"--only-binary",
":all:",
"-r",
file,
)
session.install("packaging")
# Install debugger
session.run(
"python",
"./pythonFiles/install_debugpy.py",
env={"PYTHONPATH": "./pythonFiles/lib/temp"},
)
# Download get-pip script
session.run(
"python",
"./pythonFiles/download_get_pip.py",
env={"PYTHONPATH": "./pythonFiles/lib/temp"},
)
if pathlib.Path("./pythonFiles/lib/temp").exists():
shutil.rmtree("./pythonFiles/lib/temp")