Improvement for python installation

This commit is contained in:
clsty
2025-02-04 23:14:04 +08:00
parent f06c831887
commit 7935d14d61
4 changed files with 36 additions and 34 deletions
+19 -3
View File
@@ -113,7 +113,23 @@ install-MicroTeX (){
x cd $base
}
install-uv (){
x curl -LsSf https://astral.sh/uv/install.sh | sh
}
# Below command can be used to install uv, but it's already an Arch package so...
# curl -LsSf https://astral.sh/uv/install.sh | sh
install-python-packages (){
x mkdir -p $PYTHON_VENV_PATH
# we need python 3.12 https://github.com/python-pillow/Pillow/issues/8089
x uv venv --prompt .venv $PYTHON_VENV_PATH -p 3.12
x source $PYTHON_VENV_PATH/bin/activate
x uv pip install -r scriptdata/requirements.txt
x mkdir -p $base/cache/gradience && cd $base/cache/gradience
try git init -b main
try git remote add origin https://github.com/clsty/ii-gradience.git
x git pull origin main && git submodule update --init --recursive
x uv pip install -r requirements.txt
x meson setup build --prefix=$VIRTUAL_ENV
x meson compile -C build
x meson install -C build
x cd -
x deactivate # We don't need the virtual environment anymore
}