Skip to content

Commit 471627b

Browse files
committed
ch08: add session for building with poetry
1 parent 27136ee commit 471627b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

chapter08-automation-with-nox/noxfile.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1+
from pathlib import Path
2+
13
import nox
24

35
nox.options.error_on_external_run = True
46

57

8+
@nox.session
9+
def build(session):
10+
session.install("twine")
11+
session.run("poetry", "build", external=True)
12+
session.run("twine", "check", *Path().glob("dist/*"))
13+
14+
615
@nox.session
716
def tests(session):
817
session.install(".", "pytest", "pytest-httpserver", "factory-boy")

0 commit comments

Comments
 (0)