Skip to content

Commit a909b60

Browse files
authored
Merge pull request #997 from NVIDIA/nox_version_detection
refactor(//nox): Add version detection
2 parents 6f66a12 + 325d77e commit a909b60

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

noxfile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from distutils.command.clean import clean
22
import nox
33
import os
4+
import sys
45

56
# Use system installed Python packages
67
PYT_PATH='/opt/conda/lib/python3.8/site-packages' if not 'PYT_PATH' in os.environ else os.environ["PYT_PATH"]
@@ -11,7 +12,7 @@
1112

1213
SUPPORTED_PYTHON_VERSIONS=["3.7", "3.8", "3.9", "3.10"]
1314

14-
nox.options.sessions = ["l0_api_tests-3.7"]
15+
nox.options.sessions = ["l0_api_tests-" + "{}.{}".format(sys.version_info.major, sys.version_info.minor)]
1516

1617
def install_deps(session):
1718
print("Installing deps")
@@ -26,7 +27,6 @@ def download_models(session, use_host_env=False):
2627
if use_host_env:
2728
session.run_always('python', 'hub.py', env={'PYTHONPATH': PYT_PATH})
2829
else:
29-
session.install("-r", os.path.join(TOP_DIR, "py", "requirements.txt"))
3030
session.run_always('python', 'hub.py')
3131

3232
def install_torch_trt(session):
@@ -132,7 +132,7 @@ def run_base_tests(session, use_host_env=False):
132132
session.chdir(os.path.join(TOP_DIR, 'tests/py'))
133133
tests = [
134134
"test_api.py",
135-
"test_to_backend_api.py"
135+
"test_to_backend_api.py",
136136
]
137137
for test in tests:
138138
if use_host_env:

0 commit comments

Comments
 (0)