File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,9 +135,26 @@ case ${TEST_TYPE} in
135135 echo " Could not find baseline commit for ${TARGET_BRANCH:- main} . Skipping baseline generation."
136136 fi
137137 fi
138+ # Run pip install and capture output to inspect for python compatibility issues
139+ pip_output=$( pip install -e . 2>&1 )
140+ pip_retval=$?
138141
139- pip install -e .
140-
142+ if [ ${pip_retval} -ne 0 ]; then
143+ echo " ${pip_output} "
144+ if echo " ${pip_output} " | grep -q " requires a different Python" ; then
145+ echo " WARNING: Package ${PACKAGE_NAME} is not compatible with Python ${PY_VERSION} . Skipping import profiler."
146+ deactivate
147+ rm -rf .venv-profiler
148+ rm -rf " ${PROFILER_TEMP_DIR} "
149+ exit 0
150+ else
151+ echo " ERROR: Failed to install package ${PACKAGE_NAME} ."
152+ deactivate
153+ rm -rf .venv-profiler
154+ rm -rf " ${PROFILER_TEMP_DIR} "
155+ exit ${pip_retval}
156+ fi
157+ fi
141158 if [ -f " ${BASELINE_CSV} " ]; then
142159 python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 5000 --diff-baseline " ${BASELINE_CSV} " --diff-threshold 100
143160 else
You can’t perform that action at this time.
0 commit comments