Skip to content

Commit

Permalink
installer.functions: Drop pip version check and use default
Browse files Browse the repository at this point in the history
  • Loading branch information
th0ma7 committed Jan 11, 2024
1 parent e6716dd commit dfce23a
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions mk/spksrc.service.installer.functions
Original file line number Diff line number Diff line change
Expand Up @@ -68,25 +68,15 @@ initialize_variables ()

install_python_virtualenv ()
{
# Output Python version (confirming PATH)
# Print out default python version found in PATH
python3 --version

# Create a Python virtualenv
python3 -m venv --system-site-packages ${SYNOPKG_PKGDEST}/env

# Update pip to match default used by python package
# If none found, update pip to latest version online
# Print out default pip version
read -r -a PIP_VERSION 2>/dev/null <<< $(python3 -m pip --version)
if [ "${PIP_VERSION[1]}" ]; then
PIP="pip==${PIP_VERSION[1]}"
echo "INFO: Default pip version found ${PIP}"
else
PIP="pip"
echo "WARNING: No pip found, using default online version"
fi
echo "INFO: Default pip version found ${PIP_VERSION[1]}"

python3 -m pip install --upgrade ${PIP} \
|| echo "ERROR: Python upgrade failed" 1>&2
# Create a Python virtualenv
python3 -m venv --system-site-packages ${SYNOPKG_PKGDEST}/env

if [ ${SYNOPKG_DSM_VERSION_MAJOR} -lt 7 ]; then
set_unix_permissions ${SYNOPKG_PKGDEST}/env
Expand Down

0 comments on commit dfce23a

Please sign in to comment.