diff --git a/readme.md b/readme.md index 1c9ea47..30b7aa9 100644 --- a/readme.md +++ b/readme.md @@ -56,7 +56,6 @@ 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,6 +83,11 @@ from various contexts of CA, CI and OCI / OS. * define templates * actions * includes +* handle python virtual environment + * install venv if necessary + * upgrade pip + * install packages + * ruff * relay environment module name * write tests diff --git a/spcd.sh b/spcd.sh index bb9007f..6af63bf 100644 --- a/spcd.sh +++ b/spcd.sh @@ -7,7 +7,6 @@ [ -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() { @@ -691,31 +690,6 @@ spcd_install_packages() { "${SPCD_PM_PACMAN}") spcd_install_package "openssh" ;; *) ;; esac - # venv - spcd_step "Install Python virtual environment" - case "${SPCD_OS_ID}" in - "${SPCD_OS_DEBIAN}" | "${SPCD_OS_UBUNTU}") - spcd_install_package "python3-venv" - ;; - # FIXME arch - *) ;; - esac - spcd_split - spcd_write "/etc/pip.conf" "\ -[global] -index-url = ${SPCD_URL_PYTHON} -" - spcd_split - spcd_ip__venv="/opt/venv" - "${SPCD_PYTHON_ALIAS}" -m "venv" "${spcd_ip__venv}" - . "${spcd_ip__venv}/bin/activate" - spcd_split - pip install --upgrade "pip" - spcd_split - pip install \ - "pelican" \ - "ruff" \ - "sphinx" } spcd_install_python_modules() {