Skip to content

Commit

Permalink
Add support for latest debian-based distros
Browse files Browse the repository at this point in the history
  • Loading branch information
framctr committed Sep 14, 2024
1 parent e290481 commit 7d4e02c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ansible/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ ensure_nanolayer nanolayer_location "v0.5.0"
$nanolayer_location install apt-get pip,python3-dev

# --break-system-packages required by latest Debian-based distros to install the package system-wide
EXT_MANAGED_PY=$(pip install --help | grep -o '\-\-break-system-packages')

if [ "$VERSION" != "latest" ] ; then
pip install "${PACKAGE}"=="${VERSION}" --break-system-packages
pip install "$EXT_MANAGED_PY" "${PACKAGE}"=="${VERSION}"
else
pip install "$PACKAGE" --break-system-packages
pip install "$EXT_MANAGED_PY" "$PACKAGE"
fi

echo 'Done!'

0 comments on commit 7d4e02c

Please sign in to comment.