Skip to content

fix: use configured PYTHON for wheel build - #5151

Open
andrewwhitecdw wants to merge 1 commit into
NVIDIA:mainfrom
andrewwhitecdw:codequality/assets-use-configured-python-for-wheel-build
Open

fix: use configured PYTHON for wheel build#5151
andrewwhitecdw wants to merge 1 commit into
NVIDIA:mainfrom
andrewwhitecdw:codequality/assets-use-configured-python-for-wheel-build

Conversation

@andrewwhitecdw

Copy link
Copy Markdown

This PR addresses the following issue in docker/build/assets.Dockerfile: use configured PYTHON for wheel build.

Changes

  • docker/build/assets.Dockerfile: use configured PYTHON for wheel build.

Details

--- a/docker/build/assets.Dockerfile
+++ b/docker/build/assets.Dockerfile
@@ -1,1 +1,1 @@
-    python3 -m build --wheel && \
+    ${PYTHON} -m build --wheel && \

Tests

  • scripts/validate_dockerfile_python.sh
diff --git a/scripts/validate_dockerfile_python.sh b/scripts/validate_dockerfile_python.sh
new file mode 100755
--- /dev/null
+++ b/scripts/validate_dockerfile_python.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+# Validate that the wheel build and auditwheel repair commands in
+# docker/build/assets.Dockerfile use the configured PYTHON interpreter.
+set -e
+
+DOCKERFILE="docker/build/assets.Dockerfile"
+
+# Strip comments and check for hardcoded python3 in the relevant commands.
+if sed 's/#.*//' "$DOCKERFILE" | grep -n 'python3 -m build --wheel'; then
+    echo "Error: Found hardcoded python3 in wheel build command" >&2
+    exit 1
+fi
+if sed 's/#.*//' "$DOCKERFILE" | grep -n 'python3 -m auditwheel'; then
+    echo "Error: Found hardcoded python3 in auditwheel command" >&2
+    exit 1
+fi
+
+echo "OK: Dockerfile uses configured PYTHON for wheel build and repair"

Signed-off-by: andrewwhitecdw <andrewwhitecdw@users.noreply.github.com>
@copy-pr-bot

copy-pr-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the build The issue related to the CUDA Quantum build label Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build The issue related to the CUDA Quantum build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant