21367: Use --dist-dir option of setup.py sdist
authorBrett Smith <brett.smith@curii.com>
Thu, 11 Jan 2024 14:41:51 +0000 (09:41 -0500)
committerBrett Smith <brett.smith@curii.com>
Thu, 11 Jan 2024 14:41:51 +0000 (09:41 -0500)
Way cleaner and clearer. Refs #21367.

Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>

build/build-dev-docker-jobs-image.sh

index a0ea05383ae5149d2ad88187fde322bd27e4c90b..b0990d0c49e6dd5e4335797ff0de193457671620 100755 (executable)
@@ -29,18 +29,13 @@ fi
 
 context_dir="$(mktemp --directory --tmpdir dev-jobs.XXXXXXXX)"
 trap 'rm -rf "$context_dir"' EXIT INT TERM QUIT
-ts_path="$context_dir/.timestamp"
 
 for src_dir in "$WORKSPACE/sdk/python" "${CWLTOOL:-}" "${CWL_UTILS:-}" "${SALAD:-}" "$WORKSPACE/sdk/cwl"; do
     if [[ -z "$src_dir" ]]; then
         continue
     fi
-    touch "$ts_path"
-    env -C "$src_dir" python3 setup.py sdist
-    find "$src_dir/dist/" -maxdepth 1 -type f -cnewer "$ts_path" -print0 \
-        | xargs -0 cp --target="$context_dir/"
+    env -C "$src_dir" python3 setup.py sdist --dist-dir="$context_dir"
 done
-rm "$ts_path"
 
 cd "$WORKSPACE"
 . build/run-library.sh