From 80ab2e55d1a03620a98fa88dc73ecfe3af57ed23 Mon Sep 17 00:00:00 2001 From: Maciej Urbanski Date: Sat, 27 Jan 2024 10:13:22 +0100 Subject: [PATCH] autodetect CI python --- noxfile.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/noxfile.py b/noxfile.py index dbc25683..ce2ef8b2 100644 --- a/noxfile.py +++ b/noxfile.py @@ -13,6 +13,7 @@ import pathlib import re import subprocess +import sys import nox @@ -22,6 +23,10 @@ CI = os.environ.get('CI') is not None NOX_PYTHONS = os.environ.get('NOX_PYTHONS') +if CI and not NOX_PYTHONS: + NOX_PYTHONS = os.path.basename(sys.executable) + print(f"CI job mode; using provided interpreter only; equivalent to NOX_PYTHONS={NOX_PYTHONS}") + PYTHON_VERSIONS = [ 'pypy3.9', 'pypy3.10',