@nox.session(name="pyoptimize")
-@tox_parameters(["python"], [PYTHON_VERSIONS], base_tag="pyoptimize")
def test_pyoptimize(session: nox.Session) -> None:
"""Run the script consumption suite against .pyo files rather than .pyc"""
- session.install(*nox.project.dependency_groups(pyproject, "test"))
+ session.install(*nox.project.dependency_groups(pyproject, "tests"))
session.install(".")
session.env["PYTHONOPTIMIZE"] = "1"
"""
- PY_RE = re.compile(r"(?:python)?([234]\.\d+t?)")
+ PY_RE = re.compile(r"(?:python)?([234]\.\d+(t?))")
def _is_py_version(token):
return bool(PY_RE.match(token))
name
"""
+ if sys.platform == "win32":
+ return token
+
m = PY_RE.match(token)
- if m:
+
+ # do this matching minimally so that it only happens for the
+ # free-threaded versions. on windows, the "pythonx.y" syntax doesn't
+ # work due to the use of the "py" tool
+ if m and m.group(2) == "t":
return f"python{m.group(1)}"
else:
return token
]
# for p in params:
- # print(f"PARAM {'-'.join(p.args)} TAGS {p.tags}")
- # breakpoint()
+ # print(f"PARAM {'-'.join(p.args)} TAGS {p.tags}")
return nox.parametrize(names, params)