code-server-python3poetry: initial release

This commit is contained in:
Howard Tseng
2024-09-16 23:36:19 -04:00
parent 6360fcf7e3
commit 97a21c476d
11 changed files with 28 additions and 55 deletions
@@ -0,0 +1,14 @@
#!/usr/bin/with-contenv bash
if ! dpkg -l | grep python3-dev > /dev/null; then
echo "**** Adding python3 to package install list ****"
echo "\
build-essential \
libssl-dev \
libffi-dev \
python3-dev \
python3-pip \
python3-venv" >> /mod-repo-packages-to-install.list
else
echo "**** python3 already installed ****"
fi
@@ -4,5 +4,12 @@
# so it can take advantage of packages installed
# init-mods-end depends on this script so that later init and services wait until this script exits
echo "**** Setting up apprise ****"
apprise blah blah
echo "**** Setting up poetry ****"
# Install poetry
curl -sSL https://install.python-poetry.org | python3 -
# Add poetry to the path
echo "export PATH=\"\$HOME/.local/bin:\$PATH\"" >> /root/.bashrc
echo "**** poetry setup complete ****"
@@ -1,30 +0,0 @@
#!/usr/bin/with-contenv bash
# This is the init file used for adding os or pip packages to install lists.
# It takes advantage of the built-in init-mods-package-install init script that comes with the baseimages.
# If using this, we need to make sure we set this init as a dependency of init-mods-package-install so this one runs first
if ! command -v apprise; then
echo "**** Adding apprise and its deps to package install lists ****"
echo "apprise" >> /mod-pip-packages-to-install.list
## Ubuntu
if [ -f /usr/bin/apt ]; then
echo "\
python3 \
python3-pip \
runc" >> /mod-repo-packages-to-install.list
fi
# Alpine
if [ -f /sbin/apk ]; then
echo "\
cargo \
libffi-dev \
openssl-dev \
python3 \
python3-dev \
python3 \
py3-pip" >> /mod-repo-packages-to-install.list
fi
else
echo "**** apprise already installed, skipping ****"
fi