kdeldycke/click-extra

Remove runtime dependencies on sphinx and so on

Closed this issue · 2 comments

Hello

I see click-extra has LOT of runtime dependencies when instantiating it in a simple CLI:

 click-extra >=4 
 ├── boltons >=23.0.0,<24.0.0 (circular dependency aborted here)
 ├── click >=8.1.4,<9.0.0 (circular dependency aborted here)
 ├── cloup >=3.0.1,<4.0.0 
 │   ├── click >=8.0,<9.0 (circular dependency aborted here)
 │   └── typing-extensions * 
 ├── commentjson >=0.9.0,<0.10.0 
 │   └── lark-parser >=0.7.1,<0.8.0 
 ├── mergedeep >=1.3.4,<2.0.0 
 ├── pallets-sphinx-themes >=2.1.1,<3.0.0 
 │   ├── packaging * 
 │   └── sphinx >=3 
 │       ├── alabaster >=0.7,<0.8 
 │       ├── babel >=2.9 
 │       │   └── pytz >=2015.7 
 │       ├── colorama >=0.4.5 (circular dependency aborted here)
 │       ├── docutils >=0.18.1,<0.20 
 │       ├── imagesize >=1.3 
 │       ├── importlib-metadata >=4.8 
 │       │   └── zipp >=0.5 
 │       ├── jinja2 >=3.0 
 │       │   └── markupsafe >=2.0 
 │       ├── packaging >=21.0 (circular dependency aborted here)
 │       ├── pygments >=2.13 
 │       ├── requests >=2.25.0 (circular dependency aborted here)
 │       ├── snowballstemmer >=2.0 
 │       ├── sphinxcontrib-applehelp * 
 │       ├── sphinxcontrib-devhelp * 
 │       ├── sphinxcontrib-htmlhelp >=2.0.0 
 │       ├── sphinxcontrib-jsmath * 
 │       ├── sphinxcontrib-qthelp * 
 │       └── sphinxcontrib-serializinghtml >=1.1.5 
 ├── pygments >=2.14,<3.0 (circular dependency aborted here)
 ├── pygments-ansi-color >=0.3.0,<0.4.0 
 │   └── pygments !=2.7.3 (circular dependency aborted here)
 ├── pyyaml >=6.0.0,<7.0.0 
 ├── regex >=2023.3.22,<2024.0.0 
 ├── requests >=2.28.2,<3.0.0 (circular dependency aborted here)
 ├── sphinx >=6 (circular dependency aborted here)
 ├── tabulate >=0.9,<0.10 
 │   └── wcwidth * 
 ├── tomli >=2.0.1,<3.0.0 
 ├── wcmatch >=8.4.1,<9.0.0 
 │   └── bracex >=2.1.1 
 └── xmltodict >=0.13.0,<0.14.0 

Please provide a way to avoid my CLI to depends on sphinx, pallets-sphinx-themes, and so on, just for a simple runtime function.

Yes, that's not unreasonable to have. A more modular and leaner dependency tree is a great feature. Would you have time and resources to attempt this? We can starts with making the Sphinx stuff optional first.

I just released Click Extra 4.8.0, which make Sphinx, Pygments and Pytest optional extra dependencies by default. See: https://kdeldycke.github.io/click-extra/install.html#main-dependencies

I'm testing integrating that release into my other project as a final test. If in the mean time you find issues with dependencies, open a new ticket or comment here so I can hotfix it.