gardenlinux / python-gardenlinux-lib

Contains tools to work with the features directory of gardenlinux, for example deducting dependencies from feature sets or validating cnames
0 stars 0 forks source link

Move parse-aptsource.py here? #12

Closed fwilhe closed 1 month ago

fwilhe commented 1 month ago

Just wondering if it would make sense to have https://github.com/gardenlinux/gardenlinux/blob/main/hack/parse-aptsource.py in here. This is a pretty useful code originally from glvd that can parse apt package index files and I'm using it in various scripts already.

Not sure how dependency management would work then in the gardenlinux/gardenlinux repo. What do you think @Vincinator?

Vincinator commented 1 month ago

Yes, I think this is a good Idea.

Dependency management is an interesting topic. Have not put up my mind, let's discuss this maybe if you are interested in this topic.

For now, I am not publishing this library anywhere but install it via pip git+https://URL-TO-REPO.

Generally, we have the following options

  1. via pip directly from git repository, e.g: pip install git+https://github.com/gardenlinux/python-gardenlinux-lib.git
  2. we package it in a debian package, and distribute it via packages.gardenlinux.io
  3. we publish it to https://pypi.org

I am going for option 1. in this early phase.

If you would like to install use this library, you can do:

python3 -m venv venv
source venv/bin/activate
pip install git+https://github.com/gardenlinux/python-gardenlinux-lib.git
# now you can import python_gardenlinux_lib in your .py file or include it in your dependency list (.txt, pyproject.toml, whatever) 
Vincinator commented 1 month ago

We could also move the hack/.*py helper to https://github.com/gardenlinux/python-gardenlinux-cli