mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
Improvement for python installation
This commit is contained in:
parent
f06c831887
commit
7935d14d61
4 changed files with 36 additions and 34 deletions
|
|
@ -1,15 +1,16 @@
|
|||
pkgname=illogical-impulse-python
|
||||
pkgver=1.1
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc='Illogical Impulse Python Dependencies'
|
||||
arch=(any)
|
||||
license=(None)
|
||||
depends=(
|
||||
gtk4
|
||||
libadwaita
|
||||
libsoup3
|
||||
libportal-gtk4
|
||||
blueprint-compiler
|
||||
gobject-introspection
|
||||
sassc
|
||||
uv
|
||||
gtk4
|
||||
libadwaita
|
||||
libsoup3
|
||||
libportal-gtk4
|
||||
blueprint-compiler
|
||||
gobject-introspection
|
||||
sassc
|
||||
)
|
||||
|
|
|
|||
29
install.sh
29
install.sh
|
|
@ -130,28 +130,9 @@ for i in "${metapkgs[@]}"; do
|
|||
v install-local-pkgbuild "$i" "$metainstallflags"
|
||||
done
|
||||
|
||||
ags_state_dir=~/.local/state/ags
|
||||
|
||||
showfun install-uv
|
||||
v install-uv
|
||||
|
||||
x mkdir -p $ags_state_dir
|
||||
# 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
|
||||
|
||||
# install gradience
|
||||
gradience_dir=/tmp/gradience
|
||||
x git clone https://github.com/ZeyadMoustafaKamal/Gradience.git $gradience_dir
|
||||
x cd $gradience_dir
|
||||
x 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
|
||||
# These python packages are installed using uv, not pacman.
|
||||
showfun install-python-packages
|
||||
v install-python-packages
|
||||
|
||||
# Why need cleanbuild? see https://github.com/end-4/dots-hyprland/issues/389#issuecomment-2040671585
|
||||
# Why install deps by running a seperate command? see pinned comment of https://aur.archlinux.org/packages/hyprland-git
|
||||
|
|
@ -321,6 +302,10 @@ case $existed_hypr_conf in
|
|||
printf "\e[33mIf this is your first time installation, you must overwrite \"$XDG_CONFIG_HOME/hypr/hyprland.conf\" with \"$XDG_CONFIG_HOME/hypr/hyprland.conf.new\".\e[0m\n"
|
||||
;;esac
|
||||
|
||||
if [[ -z "${ILLOGICAL_IMPULSE_VIRTUAL_ENV}" ]]; then
|
||||
printf "\n\e[31m[$0]: \!! Important \!! : Please ensure environment variable \e[0m \$ILLOGICAL_IMPULSE_VIRTUAL_ENV \e[31m is set to proper value (by default \"~/.local/state/ags/.venv\"), or AGS config will not work. We have already provided this configuration in ~/.config/hypr/hyprland/env.conf, but you need to ensure it is included in hyprland.conf, and also a restart is needed for applying it.\e[0m\n"
|
||||
fi
|
||||
|
||||
if [[ ! -z "${warn_files[@]}" ]]; then
|
||||
printf "\n\e[31m[$0]: \!! Important \!! : Please delete \e[0m ${warn_files[*]} \e[31m manually as soon as possible, since we\'re now using AUR package or local PKGBUILD to install them for Arch(based) Linux distros, and they'll take precedence over our installation, or at least take up more space.\e[0m\n"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -7,4 +7,4 @@ XDG_STATE_HOME=${XDG_STATE_HOME:-$HOME/.local/state}
|
|||
BACKUP_DIR=${BACKUP_DIR:-$HOME/backup}
|
||||
UV_NO_MODIFY_PATH=1
|
||||
PYTHON_VENV_PATH=$XDG_STATE_HOME/ags/.venv
|
||||
PYTHON_BIN_PATH=$PYTHON_VENV_PATH/bin/python
|
||||
#PYTHON_BIN_PATH=$PYTHON_VENV_PATH/bin/python
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue