kaxil / airflowctl

A CLI tool to streamline getting started with Apache Airflow™ and managing multiple Airflow projects
Apache License 2.0
191 stars 13 forks source link

Remove pip as the primary installation method #33

Open ketozhang opened 9 months ago

ketozhang commented 9 months ago

airflowctl is affected by the chicken-and-egg problem of Python version. No surprisingly it has the same burden as other Python environment & project managers (e.g., hatch, pipx, pyenv) :

If we start with pip, the version used in airflowctl built must match the same version as your pip environment:

    $ python -V
    Python X.Y.Z

    $ python -m pip install airflowctl
    $ airflowctl init --python-version=X.Y.Z .
    $ airflowctl build .

Otherwise pyenv is invoked to get the correct python version (forcing users to use a specific version manager).

The above is the ideal instruction if we're going to use pip. With the current instructions, you can run into a lot of issues if you have one of these situation:

Here are my suggestions:

Alternatively, although a bigger rewrite, switch to using hatch or rye.

kaxil commented 1 month ago

I have switched to using uv (PR: https://github.com/kaxil/airflowctl/pull/39) and created 0.2.11. Let me know if you try it out