Compare commits
8 commits
b414222048
...
0ad80b2761
Author | SHA1 | Date | |
---|---|---|---|
0ad80b2761 | |||
dd457b9a85 | |||
42f2cf73c5 | |||
a9c8f13068 | |||
e770a6e721 | |||
4ce608c7f8 | |||
124200a5ad | |||
17c9b919aa |
2 changed files with 27 additions and 5 deletions
|
@ -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 |
|
||||||
|
|
||||||
|
@ -83,11 +84,6 @@ from various contexts of CA, CI and OCI / OS.
|
||||||
* define templates
|
* define templates
|
||||||
* actions
|
* actions
|
||||||
* includes
|
* includes
|
||||||
* handle python virtual environment
|
|
||||||
* install venv if necessary
|
|
||||||
* upgrade pip
|
|
||||||
* install packages
|
|
||||||
* ruff
|
|
||||||
* relay environment module name
|
* relay environment module name
|
||||||
* write tests
|
* write tests
|
||||||
|
|
||||||
|
|
26
spcd.sh
26
spcd.sh
|
@ -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() {
|
||||||
|
@ -690,6 +691,31 @@ spcd_install_packages() {
|
||||||
"${SPCD_PM_PACMAN}") spcd_install_package "openssh" ;;
|
"${SPCD_PM_PACMAN}") spcd_install_package "openssh" ;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
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() {
|
spcd_install_python_modules() {
|
||||||
|
|
Loading…
Reference in a new issue