Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use uv to manage dependencies #1060

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ZeyadMoustafaKamal
Copy link

@ZeyadMoustafaKamal ZeyadMoustafaKamal commented Jan 24, 2025

closes #1017

As mentioned in #1017 many users have reported that they had a problem with the installer and basically creating a virtual environment will fix everything. We will use uv since it's the new way for how stuff works in python.

what we will do

  • Modify the installer to install uv along with the other tools. And also creating the virtual environment itself. It should be in $XDG_STATE_DIR.
  • Add a requirements.in file that contains dependencies.
  • Install all needed dependencies.
  • Modify all scripts to use the new python interpreter.
  • Finally add a documentation that should explain how to deal with the new thing.

@ZeyadMoustafaKamal
Copy link
Author

ZeyadMoustafaKamal commented Jan 25, 2025

@clsty For this part

dots-hyprland/install.sh

Lines 136 to 143 in 41520ae

case $SKIP_PYMYC_AUR in
true) sleep 0;;
*)
pymycinstallflags=""
$ask && showfun install-local-pkgbuild || pymycinstallflags="$pymycinstallflags --noconfirm"
v install-local-pkgbuild "./arch-packages/illogical-impulse-pymyc-aur" "$pymycinstallflags"
;;
esac

As you can see. All packages in the mentioned PKGBUILD will be installed by uv except for grandience. Because it doesn't exists in the python package registry and the repo doesn't have a setup.py or a pyproject.toml. So we will leave it for yay. But as the problem mentioned here will no longer be an issue because we are installing everything in a virtual environment I think that we should basically remove this part. Is there anything that would force us to keep this part ?

@clsty
Copy link
Collaborator

clsty commented Jan 26, 2025

Because it doesn't exists in the python package registry and the repo doesn't have a setup.py or a pyproject.toml. So we will leave it for yay.

Because that some issues are related to gradience too, I hope we can remove the use of yay for gradience.

setup.py or pyproject.toml is not existed, however, maybe(?) you can fork the gradience repo and create the required files by understanding and converting manually its provided installation process which uses meson:

I'm not sure whether this method will work. But we'd better avoid yay on gradience anyway.

But as the problem mentioned here will no longer be an issue because we are installing everything in a virtual environment I think that we should basically remove this part. Is there anything that would force us to keep this part ?

We need a gradience as gradience-cli is used here, which is the only reason. The part of this bash script you quoted is not necessary and should be removed once gradience is available using an alternative installation process, such as using uv.

@ZeyadMoustafaKamal
Copy link
Author

setup.py or pyproject.toml is not existed, however, maybe(?) you can fork the gradience repo and create the required files by understanding and converting manually its provided installation process which uses meson:

Yeah I think that I will give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Use virtual env / Use less AUR packages
2 participants