diff --git a/noxfile.py b/noxfile.py index dbc25683..e89b7c77 100644 --- a/noxfile.py +++ b/noxfile.py @@ -13,6 +13,7 @@ import pathlib import re import subprocess +import sys import nox @@ -22,6 +23,13 @@ CI = os.environ.get('CI') is not None NOX_PYTHONS = os.environ.get('NOX_PYTHONS') +if CI and not NOX_PYTHONS: + interpreter_version = f"{sys.version_info.major}.{sys.version_info.minor}" + print( + f"CI job mode; using provided interpreter only; equivalent to NOX_PYTHONS={interpreter_version}" + ) + NOX_PYTHONS = interpreter_version + PYTHON_VERSIONS = [ 'pypy3.9', 'pypy3.10',