Compare commits
No commits in common. "0ad80b2761341dd9dc3e1fe1b271015ee94f3170" and "b414222048b67e1e6c3ba2d21367d9e63d02fb31" have entirely different histories.
0ad80b2761
...
b414222048
2 changed files with 5 additions and 27 deletions
|
@ -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_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,6 +83,11 @@ 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,7 +7,6 @@
|
||||||
[ -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() {
|
||||||
|
@ -691,31 +690,6 @@ 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…
Add table
Reference in a new issue