From 0d35575a9f3305c1b3daf2c271fe708f8d0c2e34 Mon Sep 17 00:00:00 2001 From: Ralf Hubert Date: Fri, 6 Mar 2026 15:28:44 +0100 Subject: [PATCH] python3::build: add option to build the wheel only Without any additional option both sdist and wheel are generated. --- classes/python3/build.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/classes/python3/build.yaml b/classes/python3/build.yaml index c0086839..65c15936 100644 --- a/classes/python3/build.yaml +++ b/classes/python3/build.yaml @@ -6,10 +6,27 @@ depends: buildSetup: | python3Build () { + # parse arguments + OPTIND=1 + local opt + local ARGS=() + while getopts "w" opt ; do + case "$opt" in + w) + ARGS+=("--wheel") + ;; + \?) + echo "Invalid option: -$OPTARG" >&2 + exit 1 + ;; + esac + done + shift $(( OPTIND -1 )) + rm -rf build install && mkdir -p build install pushd build rsync -a --delete $1/ . - python3 -m build -n . + python3 -m build -n ${ARGS[@]} . python3 -m installer dist/*.whl --prefix ../install/usr/ popd }