Skip to content

Commit

Permalink
feat: add a dev command to nox (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii authored Mar 19, 2024
1 parent 599ade2 commit 2ea883a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import annotations

import sys

import nox

nox.options.sessions = ["lint", "tests"]
Expand All @@ -21,3 +23,19 @@ def tests(session: nox.Session) -> None:
"""
session.install(".[test]")
session.run("pytest", *session.posargs)


@nox.session(venv_backend="none")
def dev(session: nox.Session) -> None:
"""
Prepare a .venv folder.
"""

session.run(sys.executable, "-m", "venv", ".venv")
session.run(
".venv/bin/pip",
"install",
"-e.",
"-Ccmake.define.CMAKE_EXPORT_COMPILE_COMMANDS=1",
"-Cbuild-dir=build",
)

0 comments on commit 2ea883a

Please sign in to comment.