forked from dod-cyber-crime-center/DC3-MWCP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnoxfile.py
35 lines (27 loc) · 774 Bytes
/
noxfile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""
Runs tests and other routines.
Usage:
1. Install "nox"
2. Run "nox" or "nox -s test"
"""
import nox
@nox.session(python="3.8")
def test(session):
"""Run pytests"""
session.install("-e", ".[testing]")
session.run("pytest")
@nox.session(python="3.8")
def build(session):
"""Build source and wheel distribution"""
session.run("python", "setup.py", "sdist")
session.run("python", "setup.py", "bdist_wheel")
@nox.session(python=False)
def release_patch(session):
"""Generate release patch"""
session.run("mkdir", "-p", "dist", external=True)
with open("./dist/updates.patch", "w") as out:
session.run(
"git", "format-patch", "--stdout", "master",
external=True,
stdout=out
)