From 0a4c51f8a4ebb9566a39b524602b92ad331a6d6e Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Sat, 5 Oct 2024 02:12:29 -0400 Subject: [PATCH] chore: update noxfile a bit Signed-off-by: Henry Schreiner --- noxfile.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/noxfile.py b/noxfile.py index a447f460..75abdbb4 100644 --- a/noxfile.py +++ b/noxfile.py @@ -2,12 +2,15 @@ import nox -ALL_PYTHONS = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] - -nox.needs_version = ">=2024.3.2" -nox.options.sessions = ["lint", "pylint", "tests"] +nox.needs_version = ">=2024.4.15" nox.options.default_venv_backend = "uv|virtualenv" +ALL_PYTHONS = [ + c.split()[-1] + for c in nox.project.load_toml("pyproject.toml")["project"]["classifiers"] + if c.startswith("Programming Language :: Python :: 3.") +] + @nox.session(reuse_venv=True) def lint(session): @@ -37,7 +40,7 @@ def tests(session): session.run("pytest", *session.posargs, env={"PYTHONTRACEMALLOC": "5"}) -@nox.session(reuse_venv=True) +@nox.session(reuse_venv=True, default=False) def docs(session): """ Build the docs. Pass "serve" to serve. @@ -55,7 +58,7 @@ def docs(session): session.log("Unsupported argument to docs") -@nox.session +@nox.session(default=False) def build(session): """ Build an SDist and wheel.