Fix setuptools in CI test

This commit is contained in:
VirtuBox
2024-05-04 00:18:08 +02:00
parent e97d7c9729
commit 2d6902b06f

48
install
View File

@@ -440,16 +440,16 @@ wo_install() {
cd /usr/local/lib/python3."$python_ver"/dist-packages || exit 1 cd /usr/local/lib/python3."$python_ver"/dist-packages || exit 1
fi fi
if [ "$wo_distro_codename" != "bookworm" ]; then if [ "$wo_distro_codename" != "bookworm" ]; then
python3 -m pip uninstall -yq wo wordops ee /opt/wo/bin/pip uninstall -yq wo wordops ee
fi fi
cd || exit 1 cd || exit 1
if [ -d /opt/wo/lib/python3."$python_ver"/site-packages/apt ]; then if [ -d /opt/wo/lib/python3."$python_ver"/site-packages/apt ]; then
source /opt/wo/bin/activate source /opt/wo/bin/activate
python3 -m pip install -U setuptools /opt/wo/bin/pip install -U setuptools
python3 -m pip install -U pip wheel /opt/wo/bin/pip install -U pip wheel
python3 -m pip uninstall psutil -y /opt/wo/bin/pip uninstall psutil -y
python3 -m pip uninstall SQLAlchemy -y /opt/wo/bin/pip uninstall SQLAlchemy -y
else else
rm -rf /opt/wo rm -rf /opt/wo
python3 -m venv /opt/wo python3 -m venv /opt/wo
@@ -512,43 +512,41 @@ wo_travis_install() {
if [ -f ./setup.py ]; then if [ -f ./setup.py ]; then
if [ -d /opt/wo/lib/python3."$python_ver"/site-packages/apt ]; then if [ -d /opt/wo/lib/python3."$python_ver"/site-packages/apt ]; then
source /opt/wo/bin/activate source /opt/wo/bin/activate
python3 -m pip uninstall setuptools -y /opt/wo/bin/pip install -U setuptool
python3 -m pip install -I setuptools==57.5.0 /opt/wo/bin/pip install -U pip wheel
python3 -m pip install -U pip wheel /opt/wo/bin/pip uninstall psutil -y
python3 -m pip uninstall psutil -y /opt/wo/bin/pip uninstall SQLAlchemy -y
python3 -m pip uninstall SQLAlchemy -y
else else
rm -rf /opt/wo rm -rf /opt/wo
python3 -m venv /opt/wo python3 -m venv /opt/wo
source /opt/wo/bin/activate source /opt/wo/bin/activate
python3 -m pip uninstall setuptools -y /opt/wo/bin/pip install -U setuptools
python3 -m pip install -I setuptools==57.5.0 /opt/wo/bin/pip install -U pip wheel
python3 -m pip install -U pip wheel
if [ "$wo_linux_distro" = "Debian" ] || [ "$wo_linux_distro" = "Raspbian" ]; then if [ "$wo_linux_distro" = "Debian" ] || [ "$wo_linux_distro" = "Raspbian" ]; then
if [ "$wo_distro_codename" = "stretch" ]; 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 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 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 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 fi
else else
if [ "$wo_distro_codename" = "focal" ]; then 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 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 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 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 fi
fi fi
python3 -m pip install -U . /opt/wo/bin/pip install -U .
else 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 fi
cp -rf /opt/wo/lib/python3."$python_ver"/site-packages/usr/* /usr/ cp -rf /opt/wo/lib/python3."$python_ver"/site-packages/usr/* /usr/
cp -rn /opt/wo/lib/python3."$python_ver"/site-packages/etc/* /etc/ cp -rn /opt/wo/lib/python3."$python_ver"/site-packages/etc/* /etc/
@@ -705,8 +703,8 @@ wo_clean() {
wo_uninstall() { wo_uninstall() {
local python_ver local python_ver
python_ver=$(python3 -c "import sys; print(sys.version_info[1])") python_ver=$(python3 -c "import sys; print(sys.version_info[1])")
if { python3 -m pip list | grep -q "wordops" >/dev/null 2>&1; }; then if { /opt/wo/bin/pip list | grep -q "wordops" >/dev/null 2>&1; }; then
python3 -m pip uninstall wordops -y /opt/wo/bin/pip uninstall wordops -y
fi 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 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
} }