From 9b0abc8c40459dd16a9c1205e15f6d3363bf202e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Sun, 15 Oct 2023 18:44:34 +0200 Subject: [PATCH] Build using `build` Update the build-release nox session to build using `build` instead of a direct setup.py call. --- noxfile.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/noxfile.py b/noxfile.py index a3e7ceab4cc..878dbbd0ad6 100644 --- a/noxfile.py +++ b/noxfile.py @@ -322,7 +322,7 @@ def build_release(session: nox.Session) -> None: ) session.log("# Install dependencies") - session.install("setuptools", "wheel", "twine") + session.install("build", "twine") with release.isolated_temporary_checkout(session, version) as build_dir: session.log( @@ -358,8 +358,7 @@ def build_dists(session: nox.Session) -> List[str]: ) session.log("# Build distributions") - session.install("setuptools", "wheel") - session.run("python", "setup.py", "sdist", "bdist_wheel", silent=True) + session.run("python", "-m", "build", silent=True) produced_dists = glob.glob("dist/*") session.log(f"# Verify distributions: {', '.join(produced_dists)}")