From 4ce608c7f8153fe21008f50ba0d5e64f5c223509 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 6 Aug 2024 19:29:24 +0200 Subject: [PATCH] configure pip --- readme.md | 3 ++- spcd.sh | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 19121e6..808e89f 100644 --- a/readme.md +++ b/readme.md @@ -56,6 +56,7 @@ from various contexts of CA, CI and OCI / OS. | SPCD_URL_DEBIAN | Debian repository URL | https://deb.debian.org | | SPCD_URL_EPEL | EPEL repository URL | https://dl.fedoraproject.org | | SPCD_URL_FEDORA | Fedora repository URL | https://rpmfind.net | +| SPCD_URL_PYTHON | Python repository URL | https://pypi.org/project | | SPCD_URL_ROCKY | Rocky repository URL | https://dl.rockylinux.org | | SPCD_URL_UBUNTU | Ubuntu repository URL | https://ubuntu.mirrors.ovh.net | @@ -84,7 +85,7 @@ from various contexts of CA, CI and OCI / OS. * actions * includes * handle python virtual environment - * configure pip + * activate venv * upgrade pip * install packages * ruff diff --git a/spcd.sh b/spcd.sh index 1f0d8fd..ad990cc 100644 --- a/spcd.sh +++ b/spcd.sh @@ -7,6 +7,7 @@ [ -n "${SPCD_DNS_1}" ] || SPCD_DNS_1="9.9.9.9" [ -n "${SPCD_GIT_MAIN}" ] || SPCD_GIT_MAIN="spcd" [ -n "${SPCD_GIT_ROOT}" ] || SPCD_GIT_ROOT="rwx" +[ -n "${SPCD_URL_PYTHON}" ] || SPCD_URL_PYTHON="https://pypi.org/project" # main spcd_main() { @@ -662,6 +663,11 @@ spcd_install_packages() { # FIXME arch *) ;; esac + spcd_split + spcd_write "/etc/pip.conf" "\ +[global] +index-url = ${SPCD_URL_PYTHON} +" # rsync spcd_step "Install Rsync" spcd_install_package "rsync"