Make matplotlib a optional requirement#112
Conversation
|
#104 already merged |
|
The PR your linked is different. It removes matplotlib completely from the requirements. But this PR adds it as optional requirement. |
|
I'm not sure what's standard in the Python world here. I don't see a lot of projects actually using pip's support for optional requirements. |
|
Maybe many People don't know that they exists. There are also not many Projects which have optional requirements. It's at least better than the current situation. |
|
Looking at https://github.com/sethmlarson/pypi-data ("Mostly up-to-date data about almost every package on PyPI"), 42,168 out of 224,410 have extra requirements ( ❯ sqlite3 'pypi.db' 'SELECT package_name, extra FROM deps GROUP BY package_name;' | wc -l
224410
❯ sqlite3 'pypi.db' 'SELECT package_name, extra FROM deps WHERE extra IS NOT NULL GROUP BY package_name;' | wc -l
42168 |
|
BTW optional [tkloczko@pers-jacek SPECS]$ grep 'BuildRequires:.*python3dist(sphinxext-opengraph)' -l *spec
python-argcomplete.spec
python-jsonschema-specifications.spec
python-jsonschema.spec
python-meson-python.spec
python-myst-parser.spec
python-pillow.spec
python-pyotp.spec
python-referencing.spec
python-sphinx-book-theme.spec
python-sphinx-json-schema-spec.spec
python-sphinx-sitemap.spec
python-sphinxext-opengraph.spec
python-structlog.spec
python-urllib3.spec
python-webcolors.spec
python-websockets.spec
python-xarray.spec
srain.specJust checked my build logs and [tkloczko@pers-jacek SPECS]$ xzgrep -l "cannot import name 'pyplot' from 'matplotlib'" *xz
python-argcomplete.FAIL.xz
python-jsonschema-specifications.FAIL.xz
python-meson-python.FAIL.xz
python-pillow.FAIL.xz
python-pyotp.FAIL.xz
python-structlog.FAIL.xz
python-webcolors.FAIL.xz
python-websockets.FAIL.xzIMO Here is example from building I'm going to add in my |
|
Update: when I've been checking build logs in build queue where still few packages with |
This makes it easier to install. Currently matplotlib is nowhere mentioned, so you only know that you need it by reading the Sphinx Log.