Skip to content

Commit

Permalink
Build using build
Browse files Browse the repository at this point in the history
Update the build-release nox session to build using `build`
instead of a direct setup.py call.
  • Loading branch information
sbidoul committed Oct 15, 2023
1 parent 9d4be78 commit 9b0abc8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)}")
Expand Down

0 comments on commit 9b0abc8

Please sign in to comment.