Skip to content

Commit 2ea883a

Browse files
authored
feat: add a dev command to nox (#134)
1 parent 599ade2 commit 2ea883a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

noxfile.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from __future__ import annotations
22

3+
import sys
4+
35
import nox
46

57
nox.options.sessions = ["lint", "tests"]
@@ -21,3 +23,19 @@ def tests(session: nox.Session) -> None:
2123
"""
2224
session.install(".[test]")
2325
session.run("pytest", *session.posargs)
26+
27+
28+
@nox.session(venv_backend="none")
29+
def dev(session: nox.Session) -> None:
30+
"""
31+
Prepare a .venv folder.
32+
"""
33+
34+
session.run(sys.executable, "-m", "venv", ".venv")
35+
session.run(
36+
".venv/bin/pip",
37+
"install",
38+
"-e.",
39+
"-Ccmake.define.CMAKE_EXPORT_COMPILE_COMMANDS=1",
40+
"-Cbuild-dir=build",
41+
)

0 commit comments

Comments
 (0)