From 7ee2b6f04505f6e7f3daf52c438c37a293294941 Mon Sep 17 00:00:00 2001 From: squalou Date: Fri, 18 Oct 2024 18:56:13 +0200 Subject: [PATCH] Replace virtualenv by python3 -m venv, fix #48 --- README.md | 8 ++++++++ client/arch-packages.txt | 2 +- client/client-setup.sh | 2 +- client/ubuntu-packages.txt | 3 ++- server/arch-packages.txt | 2 +- server/server-setup.sh | 2 +- server/ubuntu-packages.txt | 3 ++- 7 files changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ebeac0c..34d951d 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,14 @@ PenguinDome also uses a bunch of Python packages, all of which are deployed into a private virtualenv on the clients and server using `pip` at install time. +`virtualenv` are created with native `python3 -m venv` tool now. +Existing `virtualenv` created previously with `virtualenv` continue +to work as-is. + +The use of `netifaces` package in client plugins requires `pip` +to compile it, hence the requirement of ubuntu `python-dev` or +equivalent on *the client* side. + There's a nascent attempt in the `arch` subdirectory to build Pacman client packages for Arch Linux, but these don't entirely work right now, so for the time being, Arch clients use the same deployment diff --git a/client/arch-packages.txt b/client/arch-packages.txt index 6dc54d1..6af1ae1 100644 --- a/client/arch-packages.txt +++ b/client/arch-packages.txt @@ -22,7 +22,7 @@ git lvm2 psmisc python -python-virtualenv +python systemd tar util-linux diff --git a/client/client-setup.sh b/client/client-setup.sh index 3598c47..97a5d68 100755 --- a/client/client-setup.sh +++ b/client/client-setup.sh @@ -36,7 +36,7 @@ elif [ "$ID_LIKE" = "archlinux" -o "$ID" = "arch" ]; then fi if [ ! -d $venv ]; then - virtualenv -p python3 $venv + python3 -m venv $venv fi for dir in $(find $venv -name site-packages); do diff --git a/client/ubuntu-packages.txt b/client/ubuntu-packages.txt index 6058ae3..2b172c3 100644 --- a/client/ubuntu-packages.txt +++ b/client/ubuntu-packages.txt @@ -26,5 +26,6 @@ systemd tar ubuntu-release-upgrader-core update-notifier-common -virtualenv +python3-venv +python3-dev wireless-tools diff --git a/server/arch-packages.txt b/server/arch-packages.txt index 0520143..8a53a48 100644 --- a/server/arch-packages.txt +++ b/server/arch-packages.txt @@ -17,6 +17,6 @@ gnupg https://aur.archlinux.org/libgfshare.git openssl python -python-virtualenv +python systemd tar diff --git a/server/server-setup.sh b/server/server-setup.sh index e7e75c1..716c053 100755 --- a/server/server-setup.sh +++ b/server/server-setup.sh @@ -75,7 +75,7 @@ elif [ "$ID_LIKE" = "archlinux" ]; then fi if [ ! -d $venv ]; then - virtualenv -p python3 $venv + python3 -m venv $venv fi for dir in $(find $venv -name site-packages); do diff --git a/server/ubuntu-packages.txt b/server/ubuntu-packages.txt index 43bebd7..f56f29f 100644 --- a/server/ubuntu-packages.txt +++ b/server/ubuntu-packages.txt @@ -18,4 +18,5 @@ openssl python3 systemd tar -virtualenv +python3-venv +python3-dev