Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better pyopencl installation handling #2362

Merged
merged 1 commit into from
Nov 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/CMake/config/postinst.in
Original file line number Diff line number Diff line change
Expand Up @@ -129,20 +129,23 @@ if [ -z $VERSION ] ; then
pip install --ignore-installed numpy==1.8
fi
pip install pyopencl
elif [ $VERSION -lt 2019 ]; then
# if older version of pyopencl and import fails prompt user to upgarde pyopencl
POCL_INSTALL=$(python -c "import pyopencl")
elif [ $VERSION -lt 2019 ] && [[ $POCL_INSTALL -ne 0 ]] ; then

echo "***********************************************************************"
echo "* Pyopencl ($VERSION) is installed on the system but pyopencl >= 2019.1"
echo "* is required. Please uninstall the current pyopencl by running"
echo "* 'apt remove python-pyopencl' and then reinstall the xrt package"
echo "* 'apt remove python-pyopencl' or 'pip uninstall pyopencl'"
echo "* and then reinstall the xrt package"
echo "***********************************************************************"
exit 0
else
echo "Skipping pyopencl installation..."
exit 0
fi

if python -c "import pyopencl"; then
if [[ $POCL_INSTALL -eq 0 ]]; then
echo "Successfully installed pyopencl"
else
echo "***********************************************************************"
Expand Down