Skip to content

Commit

Permalink
Improve noxfile.py
Browse files Browse the repository at this point in the history
  • Loading branch information
paugier committed Jan 16, 2024
1 parent 7bc2b7e commit 15cfd1f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@
import nox

os.environ.update({"PDM_IGNORE_SAVED_PYTHON": "1"})
nox.options.reuse_existing_virtualenvs = 1


@nox.session
def validate_code(session):
session.run_always("pdm", "install", "-G", "dev", "--no-self", external=True)
session.run_always(
"pdm", "sync", "--clean", "-G", "dev", "--no-self", external=True
)
session.run("pdm", "validate_code", external=True)


@nox.session
def test_without_fft_and_pythran(session):
command = "pdm install -G dev -G test -G mpi --no-self"
command = "pdm sync --clean -G dev -G test -G mpi --no-self"
session.run_always(*command.split(), external=True)
session.install(
".", "--config-settings=setup-args=-Dtransonic-backend=python", "--no-deps"
Expand All @@ -31,7 +34,7 @@ def test_with_fft_and_pythran(session):
# first install fluidfft without Pythran compilation
session.install("fluidfft", env={"FLUIDFFT_TRANSONIC_BACKEND": "python"})

command = "pdm install -G dev -G test -G fft -G mpi --no-self"
command = "pdm sync --clean -G dev -G test -G fft -G mpi --no-self"
session.run_always(*command.split(), external=True)
session.install(".", "--no-deps", "-C", "setup-args=-Dnative=true")

Expand Down

0 comments on commit 15cfd1f

Please sign in to comment.