def build_pkg(session: nox.Session) -> None:
    """Build a source distribution and binary distribution (wheel)."""
    build_path = DIR.joinpath("build")
    if build_path.exists():
        shutil.rmtree(build_path)

    session.install("build")
    session.run("python", "-m", "build")
Build a source distribution and binary distribution (wheel).
noxfile.py