Skip to content
Snippets Groups Projects
noxfile.py 640 B
Newer Older
Xuefeng Ding's avatar
Xuefeng Ding committed
"""
nox configuration file.
"""

import nox
import sys


@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",
        "scikit-build-core[pyproject]",
        "pybind11",
        "pip>=23",
    )
    session.run(
        ".venv/bin/pip",
        "install",
        "--no-build-isolation",
        "--check-build-dependencies",
        "-ve.",
        "-C",
        "cmake.define.CMAKE_EXPORT_COMPILE_COMMANDS=1",
        "-C",
        "build-dir=build",
    )