From 2d6902b06f6260af79ae7b81eaedeff139293c12 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Sat, 4 May 2024 00:18:08 +0200 Subject: [PATCH] Fix setuptools in CI test --- install | 48 +++++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/install b/install index 1b059b3..ea63036 100755 --- a/install +++ b/install @@ -440,16 +440,16 @@ wo_install() { cd /usr/local/lib/python3."$python_ver"/dist-packages || exit 1 fi if [ "$wo_distro_codename" != "bookworm" ]; then - python3 -m pip uninstall -yq wo wordops ee + /opt/wo/bin/pip uninstall -yq wo wordops ee fi cd || exit 1 if [ -d /opt/wo/lib/python3."$python_ver"/site-packages/apt ]; then source /opt/wo/bin/activate - python3 -m pip install -U setuptools - python3 -m pip install -U pip wheel - python3 -m pip uninstall psutil -y - python3 -m pip uninstall SQLAlchemy -y + /opt/wo/bin/pip install -U setuptools + /opt/wo/bin/pip install -U pip wheel + /opt/wo/bin/pip uninstall psutil -y + /opt/wo/bin/pip uninstall SQLAlchemy -y else rm -rf /opt/wo python3 -m venv /opt/wo @@ -512,43 +512,41 @@ wo_travis_install() { if [ -f ./setup.py ]; then if [ -d /opt/wo/lib/python3."$python_ver"/site-packages/apt ]; then source /opt/wo/bin/activate - python3 -m pip uninstall setuptools -y - python3 -m pip install -I setuptools==57.5.0 - python3 -m pip install -U pip wheel - python3 -m pip uninstall psutil -y - python3 -m pip uninstall SQLAlchemy -y + /opt/wo/bin/pip install -U setuptool + /opt/wo/bin/pip install -U pip wheel + /opt/wo/bin/pip uninstall psutil -y + /opt/wo/bin/pip uninstall SQLAlchemy -y else rm -rf /opt/wo python3 -m venv /opt/wo source /opt/wo/bin/activate - python3 -m pip uninstall setuptools -y - python3 -m pip install -I setuptools==57.5.0 - python3 -m pip install -U pip wheel + /opt/wo/bin/pip install -U setuptools + /opt/wo/bin/pip install -U pip wheel if [ "$wo_linux_distro" = "Debian" ] || [ "$wo_linux_distro" = "Raspbian" ]; then if [ "$wo_distro_codename" = "stretch" ]; then - python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.4.y#egg=python-apt + /opt/wo/bin/pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.4.y#egg=python-apt elif [ "$wo_distro_codename" = "bullseye" ]; then - python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.2.1#egg=python-apt + /opt/wo/bin/pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.2.1#egg=python-apt elif [ "$wo_distro_codename" = "bookworm" ]; then - python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.5.3#egg=python-apt + /opt/wo/bin/pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.5.3#egg=python-apt else - python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.8.4.y#egg=python-apt + /opt/wo/bin/pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.8.4.y#egg=python-apt fi else if [ "$wo_distro_codename" = "focal" ]; then - python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.0.0#egg=python-apt + /opt/wo/bin/pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.0.0#egg=python-apt elif [ "$wo_distro_codename" = "bionic" ]; then - python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.6.y#egg=python-apt + /opt/wo/bin/pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.6.y#egg=python-apt elif [ "$wo_distro_codename" = "jammy" ]; then - python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.2.1#egg=python-apt + /opt/wo/bin/pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.2.1#egg=python-apt else - python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.8.y#egg=python-apt + /opt/wo/bin/pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.8.y#egg=python-apt fi fi fi - python3 -m pip install -U . + /opt/wo/bin/pip install -U . else - python3 -m pip install -U "git+https://github.com/WordOps/WordOps.git@$wo_branch#egg=wordops" + /opt/wo/bin/pip install -U "git+https://github.com/WordOps/WordOps.git@$wo_branch#egg=wordops" fi cp -rf /opt/wo/lib/python3."$python_ver"/site-packages/usr/* /usr/ cp -rn /opt/wo/lib/python3."$python_ver"/site-packages/etc/* /etc/ @@ -705,8 +703,8 @@ wo_clean() { wo_uninstall() { local python_ver python_ver=$(python3 -c "import sys; print(sys.version_info[1])") - if { python3 -m pip list | grep -q "wordops" >/dev/null 2>&1; }; then - python3 -m pip uninstall wordops -y + if { /opt/wo/bin/pip list | grep -q "wordops" >/dev/null 2>&1; }; then + /opt/wo/bin/pip uninstall wordops -y fi rm -rf /usr/local/lib/python3."$python_ver"/dist-packages/{pystache-*,cement-2.*,wo-*,wordops-*} /usr/local/bin/wo /etc/bash_completion.d/wo_auto.rc /var/lib/wo /etc/wo /usr/lib/wo/templates /opt/wo }