Skip to content

Commit d3da221

Browse files
[CI/CD] Fix CI Python tests by using python -m pip (#1838)
- The CI pipeline was failing with "pip: command not found" error. - Updated run_python_tests.sh to invoke pip through the Python interpreter (python -m pip) instead of directly, ensuring compatibility with ASWF CI containers where pip may not be directly in PATH. **Link the Issue(s) this Pull Request is related to.** - #1839
1 parent 22ace60 commit d3da221

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ci/run_python_tests.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,24 @@ args=("$@")
1111
python_version=$(python -V 2>&1)
1212
echo "Will run tests using ${python_version}"
1313

14-
pip uninstall --yes opencue_proto opencue_pycue opencue_pyoutline opencue_cueadmin opencue_cueman opencue_cuesubmit opencue_rqd
14+
python -m pip uninstall --yes opencue_proto opencue_pycue opencue_pyoutline opencue_cueadmin opencue_cueman opencue_cuesubmit opencue_rqd
1515

1616
if [[ -v OPENCUE_PROTO_PACKAGE_PATH ]]
1717
then
1818
echo "Installing pre-built opencue_proto package"
19-
pip install ${OPENCUE_PROTO_PACKAGE_PATH}
19+
python -m pip install ${OPENCUE_PROTO_PACKAGE_PATH}
2020
else
21-
pip install ./proto
21+
python -m pip install ./proto
2222
fi
2323

2424
for package in pycue pyoutline cueadmin cueman cuesubmit rqd
2525
do
2626
PACKAGE_PATH="OPENCUE_${package^^}_PACKAGE_PATH"
2727
if [[ -v "${PACKAGE_PATH}" ]]
2828
then
29-
pip install "${!PACKAGE_PATH}[test]"
29+
python -m pip install "${!PACKAGE_PATH}[test]"
3030
else
31-
pip install "./${package}[test]"
31+
python -m pip install "./${package}[test]"
3232
fi
3333
python -m pytest ${package}
3434
done

0 commit comments

Comments
 (0)