diff options
author | Ben Sima <ben@bsima.me> | 2023-08-16 14:18:10 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2023-08-16 18:25:00 -0400 |
commit | 7d7e0c02351303489d5555627337a39b519b536a (patch) | |
tree | 794817b6d6046a265a129c910885339058773198 /Biz/Bild/Builder.nix | |
parent | 30d03210f7ac5b12235760f625bac5ff3aa3f85a (diff) |
Get python targets building
I added 'black' to Biz/Lint.hs, but not the others because they rely on
dependencies being in the PYTHONPATH to work, so they are only relevant
in nix builds and repls.
I also made some other tweaks to the python checkPhase and linted all
the files. Everything should be building and linting correctly now.
Diffstat (limited to 'Biz/Bild/Builder.nix')
-rw-r--r-- | Biz/Bild/Builder.nix | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Biz/Bild/Builder.nix b/Biz/Bild/Builder.nix index 214c110..2b1403a 100644 --- a/Biz/Bild/Builder.nix +++ b/Biz/Bild/Builder.nix @@ -59,10 +59,13 @@ in { buildInputs = sysdeps_; checkInputs = [(private.pythonWith (p: with p; [black mypy pylint]))]; checkPhase = '' - black --quiet --exclude 'setup\.py$' --check . - pylint --errors-only . - mypy --strict --no-error-summary --exclude 'setup\.py$' . - python -m ${main} test + check() { + $@ || { echo "fail: $name: $3"; exit 1; } + } + check python -m black --quiet --exclude 'setup\.py$' --check . + check python -m pylint --errors-only . + check python -m mypy --strict --no-error-summary --exclude 'setup\.py$' . + check python -m ${main} test ''; preBuild = '' # initialize possibly-empty subdirectories as python modules |