Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ def downstream(session: nox.Session) -> None:
parser = argparse.ArgumentParser(prog=f"{Path(sys.argv[0]).name} -s downstream")
parser.add_argument("project", help="A project to build")
parser.add_argument("--subdir", help="A subdirectory to build")
parser.add_argument(
"--editable", action="store_true", help="Install as editable wheel"
)
parser.add_argument("-c", dest="code", help="Run some Python code")
args, remaining = parser.parse_known_args(session.posargs)

tmp_dir = Path(session.create_tmp())
Expand Down Expand Up @@ -265,12 +269,20 @@ def downstream(session: nox.Session) -> None:
if args.subdir:
session.chdir(args.subdir)

session.run(
"python",
"-m",
"build",
"--no-isolation",
"--skip-dependency-check",
"--wheel",
".",
)
if args.editable:
session.install("-e.")
else:
session.run(
"python",
"-m",
"build",
"--no-isolation",
"--skip-dependency-check",
"--wheel",
".",
)
if args.code:
session.error("Must use editable install for code at the moment")

if args.code:
session.run("python", "-c", args.code)