Skip to content

Commit f71ccd5

Browse files
adrianlizarragaankitm3k
authored andcommitted
Fix build for linux python wheel (microsoft#22801)
### Description Fixes command for building Linux python packages by preventing an empty `-p` command-line option from being passed to a subsequent build script: https://github.com/microsoft/onnxruntime/blob/1f3b675453e8412e5c084bfb95997967d0c2eec2/tools/ci_build/github/linux/run_python_dockerbuild.sh#L37 ### Motivation and Context A recent [PR ](microsoft#22773 a new optional command-line option (`-p`) to pass custom python exe paths. We need to check if the option is empty before forwarding the option to a separate build script.
1 parent 799d5c6 commit f71ccd5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/ci_build/github/linux/run_python_dockerbuild.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ done
1818
mkdir -p "${HOME}/.onnx"
1919
DOCKER_SCRIPT_OPTIONS="-d ${DEVICE} -c ${BUILD_CONFIG}"
2020

21+
if [ "${PYTHON_EXES}" != "" ] ; then
22+
DOCKER_SCRIPT_OPTIONS+=" -p ${PYTHON_EXES}"
23+
fi
24+
2125
if [ "${BUILD_EXTR_PAR}" != "" ] ; then
2226
DOCKER_SCRIPT_OPTIONS+=" -x ${BUILD_EXTR_PAR}"
2327
fi
@@ -34,7 +38,7 @@ docker run --rm \
3438
-e ORT_DISABLE_PYTHON_PACKAGE_LOCAL_VERSION \
3539
-e DEFAULT_TRAINING_PACKAGE_DEVICE \
3640
$ADDITIONAL_DOCKER_PARAMETER \
37-
$DOCKER_IMAGE tools/ci_build/github/linux/build_linux_python_package.sh -c $BUILD_CONFIG -p $PYTHON_EXES $DOCKER_SCRIPT_OPTIONS
41+
$DOCKER_IMAGE tools/ci_build/github/linux/build_linux_python_package.sh $DOCKER_SCRIPT_OPTIONS
3842

3943
sudo rm -rf "${BUILD_BINARIESDIRECTORY}/${BUILD_CONFIG}/onnxruntime" "${BUILD_BINARIESDIRECTORY}/${BUILD_CONFIG}/pybind11" \
4044
"${BUILD_BINARIESDIRECTORY}/${BUILD_CONFIG}/models" "${BUILD_BINARIESDIRECTORY}/${BUILD_CONFIG}/_deps" \

0 commit comments

Comments
 (0)