summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2024-01-13 17:54:53 +0200
committerLars Wirzenius <liw@liw.fi>2024-01-13 17:55:07 +0200
commit8a428c26a36d4ff2cddf69e5ffbc58787590931d (patch)
treef0f320428fddd7607a6e81dd0832514ded4c7b8b
parenta9d2f7418f7377e31591484dc44e655a54ae487e (diff)
downloadjt2-8a428c26a36d4ff2cddf69e5ffbc58787590931d.tar.gz
build: drop use of jq
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
-rwxr-xr-xcheck9
-rw-r--r--debian/control2
2 files changed, 7 insertions, 4 deletions
diff --git a/check b/check
index 2db4c0e..642dfbe 100755
--- a/check
+++ b/check
@@ -33,13 +33,18 @@ $hideok cargo build --all-targets $offline
$hideok cargo test $offline
$hideok cargo fmt -- --check
-$hideok find . -type f -name '*.py' ! -name test.py -exec black --check '{}' +
+if command -v black >/dev/null; then
+ $hideok find . -type f -name '*.py' ! -name test.py -exec black --check '{}' +
+fi
$hideok subplot docgen jt.subplot --output jt.html
$hideok subplot codegen jt.subplot --output test.py
rm -f test.log
-target="$(cargo metadata --format-version=1 | jq -r .target_directory)"
+target="$(
+ cargo metadata --format-version=1 |
+ python3 -c 'import json, sys; o = json.load(sys.stdin); print (o["target_directory"])'
+)"
if ! $hideok python3 test.py --log test.log --env "CARGO_TARGET_DIR=$target" "$@"; then
cat test.log
fi
diff --git a/debian/control b/debian/control
index 0802033..a43faf1 100644
--- a/debian/control
+++ b/debian/control
@@ -6,9 +6,7 @@ Standards-Version: 4.2.0
Build-Depends:
debhelper (>= 10~),
build-essential,
- black,
dh-cargo,
- jq,
moreutils,
python3,
subplot