Skip to content

Commit

Permalink
Merge pull request pybamm-team#3539 from agriyakhetarpal/fix-installa…
Browse files Browse the repository at this point in the history
…tion-bug-nox-dev-wheel

Fix installation bug with `nox`
  • Loading branch information
Saransh-cpp authored Nov 25, 2023
2 parents 2ee8da2 + c3af572 commit f440164
Showing 1 changed file with 35 additions and 23 deletions.
58 changes: 35 additions & 23 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"SUNDIALS_INST": f"{homedir}/.local",
"LD_LIBRARY_PATH": f"{homedir}/.local/lib:",
}
VENV_DIR = Path('./venv').resolve()
VENV_DIR = Path("./venv").resolve()


def set_environment_variables(env_dict, session):
Expand Down Expand Up @@ -121,13 +121,25 @@ def set_dev(session):
session.install("virtualenv", "cmake")
session.run("virtualenv", os.fsdecode(VENV_DIR), silent=True)
python = os.fsdecode(VENV_DIR.joinpath("bin/python"))
session.run(
python,
"-m",
"pip",
"install",
"--upgrade",
"pip",
"setuptools",
"wheel",
external=True,
)
if sys.platform == "linux":
session.run(python,
"-m",
"pip",
"install",
".[all,dev,jax,odes]",
external=True,
session.run(
python,
"-m",
"pip",
"install",
".[all,dev,jax,odes]",
external=True,
)
else:
session.run(python, "-m", "pip", "install", "-e", ".[all,dev]", external=True)
Expand All @@ -153,26 +165,26 @@ def build_docs(session):
# Local development
if session.interactive:
session.run(
"sphinx-autobuild",
"-j",
"auto",
"--open-browser",
"-qT",
".",
f"{envbindir}/../tmp/html",
"sphinx-autobuild",
"-j",
"auto",
"--open-browser",
"-qT",
".",
f"{envbindir}/../tmp/html",
)
# Runs in CI only, treating warnings as errors
else:
session.run(
"sphinx-build",
"-j",
"auto",
"-b",
"html",
"-W",
"--keep-going",
".",
f"{envbindir}/../tmp/html",
"sphinx-build",
"-j",
"auto",
"-b",
"html",
"-W",
"--keep-going",
".",
f"{envbindir}/../tmp/html",
)


Expand Down

0 comments on commit f440164

Please sign in to comment.