configure pip

This commit is contained in:
Marc Beninca 2024-08-06 19:29:24 +02:00
parent 124200a5ad
commit 4ce608c7f8
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 8 additions and 1 deletions

View file

@ -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_DEBIAN | Debian repository URL | https://deb.debian.org |
| SPCD_URL_EPEL | EPEL repository URL | https://dl.fedoraproject.org | | SPCD_URL_EPEL | EPEL repository URL | https://dl.fedoraproject.org |
| SPCD_URL_FEDORA | Fedora repository URL | https://rpmfind.net | | 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_ROCKY | Rocky repository URL | https://dl.rockylinux.org |
| SPCD_URL_UBUNTU | Ubuntu repository URL | https://ubuntu.mirrors.ovh.net | | 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 * actions
* includes * includes
* handle python virtual environment * handle python virtual environment
* configure pip * activate venv
* upgrade pip * upgrade pip
* install packages * install packages
* ruff * ruff

View file

@ -7,6 +7,7 @@
[ -n "${SPCD_DNS_1}" ] || SPCD_DNS_1="9.9.9.9" [ -n "${SPCD_DNS_1}" ] || SPCD_DNS_1="9.9.9.9"
[ -n "${SPCD_GIT_MAIN}" ] || SPCD_GIT_MAIN="spcd" [ -n "${SPCD_GIT_MAIN}" ] || SPCD_GIT_MAIN="spcd"
[ -n "${SPCD_GIT_ROOT}" ] || SPCD_GIT_ROOT="rwx" [ -n "${SPCD_GIT_ROOT}" ] || SPCD_GIT_ROOT="rwx"
[ -n "${SPCD_URL_PYTHON}" ] || SPCD_URL_PYTHON="https://pypi.org/project"
# main # main
spcd_main() { spcd_main() {
@ -662,6 +663,11 @@ spcd_install_packages() {
# FIXME arch # FIXME arch
*) ;; *) ;;
esac esac
spcd_split
spcd_write "/etc/pip.conf" "\
[global]
index-url = ${SPCD_URL_PYTHON}
"
# rsync # rsync
spcd_step "Install Rsync" spcd_step "Install Rsync"
spcd_install_package "rsync" spcd_install_package "rsync"