This commit is contained in:
tteckster
2024-02-01 20:26:44 -05:00
committed by GitHub
parent 661411d8e8
commit 6ee2ccf943
123 changed files with 145 additions and 161 deletions
+20 -36
View File
@@ -34,44 +34,28 @@ $STD apt-get install -y \
dbus-broker \
libpcap-dev \
libmariadb-dev-compat \
checkinstall \
libreadline-dev \
libncursesw5-dev \
libsqlite3-dev \
tk-dev \
libgdbm-dev \
libc6-dev \
libbz2-dev \
libatlas-base-dev
msg_ok "Installed Dependencies"
msg_info "Updating Python3"
$STD apt-get install -y \
python3 \
python3-dev \
python3-pip \
python3-venv
msg_ok "Updated Python3"
msg_info "Installing pyenv"
$STD apt-get install -y \
make \
libreadline-dev \
libsqlite3-dev \
libncurses5-dev \
libncursesw5-dev \
xz-utils \
tk-dev \
llvm \
libbz2-dev \
libxml2-dev \
libxmlsec1-dev \
liblzma-dev
$STD git clone https://github.com/pyenv/pyenv.git ~/.pyenv
set +e
echo 'export PYENV_ROOT="$HOME/.pyenv"' >>~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >>~/.bashrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >>~/.bashrc
msg_ok "Installed pyenv"
. ~/.bashrc
set -e
msg_info "Installing Python 3.12.1 (Patience)"
$STD pyenv install 3.12.1
pyenv global 3.12.1
msg_ok "Installed Python 3.12.1"
msg_info "Installing Python3.12.1"
$STD apt-get remove -y python3
curl -sL https://www.python.org/ftp/python/3.12.1/Python-3.12.1.tar.xz | tar xJf -
cd Python-3.12.1
$STD ./configure --enable-optimizations
$STD make -j $(nproc)
$STD make altinstall
$STD update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.12 1
cd ~
rm -rf Python-3.12.1
msg_ok "Installed Python3.12.1"
msg_info "Installing Home Assistant-Core"
mkdir /srv/homeassistant
@@ -109,4 +93,4 @@ customize
msg_info "Cleaning up"
$STD apt-get autoremove
$STD apt-get autoclean
msg_ok "Cleaned"
msg_ok "Cleaned"