From 8a428c26a36d4ff2cddf69e5ffbc58787590931d Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 13 Jan 2024 17:54:53 +0200 Subject: build: drop use of jq Signed-off-by: Lars Wirzenius Sponsored-by: author --- check | 9 +++++++-- debian/control | 2 -- 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 -- cgit v1.2.1