From 50d8407f04d3269470728200f072a430f3f4571a Mon Sep 17 00:00:00 2001 From: paukstelis Date: Sat, 17 Dec 2022 22:32:24 -0500 Subject: [PATCH] alias attempt --- octoprint_deploy.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/octoprint_deploy.sh b/octoprint_deploy.sh index 498e9f0..4e35a70 100755 --- a/octoprint_deploy.sh +++ b/octoprint_deploy.sh @@ -736,16 +736,19 @@ prepare () { #install packages #All DEB based #Python 3.11 currently not compatible with OP, redefine for Fedora - PYVERSION='python3' if [ $INSTALL -eq 2 ]; then apt-get update > /dev/null deb_packages fi #Fedora35/CentOS if [ $INSTALL -eq 3 ]; then - dnf -y install gcc python3.10-devel cmake libjpeg-turbo-devel libbsd-devel libevent-devel haproxy openssh openssh-server libffi-devel + dnf -y install gcc python3-devel cmake libjpeg-turbo-devel libbsd-devel libevent-devel haproxy openssh openssh-server libffi-devel systemctl enable sshd.service - PYVERSION='python3.10' + PYV=$(python3 -c"import sys; print(sys.version_info.minor)") + if [ $PYV -eq 11 ]; then + dnf -y install python3.10-devel + alias python3='/usr/bin/python3.10' + fi fi #ArchLinux @@ -757,7 +760,7 @@ prepare () { systemctl enable ssh.service echo "Installing OctoPrint virtual environment in /home/$user/OctoPrint" #make venv - sudo -u $user $PYVERSION -m venv /home/$user/OctoPrint + sudo -u $user python3 -m venv /home/$user/OctoPrint #update pip sudo -u $user /home/$user/OctoPrint/bin/pip install --upgrade pip #pre-install wheel