@@ -24,10 +24,9 @@ classifiers=[
2424
2525# When updating the list of dependencies, add an api_changes/development
2626# entry and also update the following places:
27+ # - the `build` and `test-minver` dependency groups below
2728# - lib/matplotlib/__init__.py (matplotlib._check_versions())
28- # - requirements/testing/minver.txt
2929# - doc/devel/dependencies.rst
30- # - .github/workflows/tests.yml
3130# - environment.yml
3231dependencies = [
3332 " contourpy >= 1.0.1" ,
@@ -42,20 +41,6 @@ dependencies = [
4241]
4342requires-python = " >=3.11"
4443
45- [project .optional-dependencies ]
46- # Should be a copy of the build dependencies below.
47- dev = [
48- " meson-python>=0.13.1,<0.17.0" ,
49- " pybind11>=2.13.2,!=2.13.3" ,
50- " setuptools_scm>=7" ,
51- # Not required by us but setuptools_scm without a version, cso _if_
52- # installed, then setuptools_scm 8 requires at least this version.
53- # Unfortunately, we can't do a sort of minimum-if-installed dependency, so
54- # we need to keep this for now until setuptools_scm _fully_ drops
55- # setuptools.
56- " setuptools>=64" ,
57- ]
58-
5944[project .urls ]
6045"Homepage" = " https://matplotlib.org"
6146"Download" = " https://matplotlib.org/stable/install/index.html"
@@ -67,13 +52,138 @@ dev = [
6752
6853[build-system ]
6954build-backend = " mesonpy"
70- # Also keep in sync with optional dependencies above .
55+ # Also keep in sync with dependency groups below .
7156requires = [
7257 " meson-python>=0.13.1,<0.17.0" ,
7358 " pybind11>=2.13.2,!=2.13.3" ,
7459 " setuptools_scm>=7" ,
7560]
7661
62+ [dependency-groups ]
63+ build = [
64+ # Should be the same as `[project] dependencies` above.
65+ " contourpy >= 1.0.1" ,
66+ " cycler >= 0.10" ,
67+ " fonttools >= 4.22.0" ,
68+ " kiwisolver >= 1.3.1" ,
69+ " numpy >= 1.25" ,
70+ " packaging >= 20.0" ,
71+ " pillow >= 9" ,
72+ " pyparsing >= 3" ,
73+ " python-dateutil >= 2.7" ,
74+
75+ # Should be the same as `[build-system] requires` above.
76+ " meson-python>=0.13.1,<0.17.0" ,
77+ " pybind11>=2.13.2,!=2.13.3" ,
78+ " setuptools_scm>=7" ,
79+ # Not required by us but setuptools_scm without a version, so _if_
80+ # installed, then setuptools_scm 8 requires at least this version.
81+ # Unfortunately, we can't do a sort of minimum-if-installed dependency, so
82+ # we need to keep this for now until setuptools_scm _fully_ drops
83+ # setuptools.
84+ " setuptools>=64" ,
85+ ]
86+ dev = [
87+ {include-group = " build" },
88+ {include-group = " doc" },
89+ {include-group = " test" },
90+ {include-group = " test-extra" },
91+ " ruff" ,
92+ ]
93+ # Requirements for building docs
94+ #
95+ # You will first need a matching Matplotlib installation
96+ # e.g (from the Matplotlib root directory)
97+ # pip install --graup build --no-build-isolation --editable .
98+ #
99+ # Install the documentation requirements with:
100+ # pip install --group doc
101+ #
102+ doc = [
103+ " sphinx>=5.1.0,!=6.1.2" ,
104+ " colorspacious" ,
105+ " ipython" ,
106+ " ipywidgets" ,
107+ " ipykernel" ,
108+ " numpydoc>=1.0" ,
109+ " pydata-sphinx-theme~=0.15.0" ,
110+ " mpl-sphinx-theme~=3.9.0" ,
111+ " pyyaml" ,
112+ " PyStemmer" ,
113+ " sphinxcontrib-svg2pdfconverter>=1.1.0" ,
114+ " sphinxcontrib-video>=0.2.1" ,
115+ " sphinx-copybutton" ,
116+ " sphinx-design" ,
117+ " sphinx-gallery[parallel]>=0.12.0" ,
118+ " sphinx-tags>=0.4.0" ,
119+ ]
120+
121+ # pip requirements for all the CI builds
122+ test = [
123+ " black<24" ,
124+ " certifi" ,
125+ " coverage!=6.3" ,
126+ " psutil; sys_platform != 'cygwin'" ,
127+ " pytest!=4.6.0,!=5.4.0,!=8.1.0" ,
128+ " pytest-cov" ,
129+ " pytest-rerunfailures" ,
130+ " pytest-timeout" ,
131+ " pytest-xdist" ,
132+ " pytest-xvfb" ,
133+ " tornado" ,
134+ ]
135+
136+ # Extra pip requirements
137+ test-extra = [
138+ " --prefer-binary" ,
139+ " ipykernel" ,
140+ # jupyter/nbconvert#1970 for the 7.3 series exclusions
141+ " nbconvert[execute]!=6.0.0,!=6.0.1,!=7.3.0,!=7.3.1" ,
142+ " nbformat!=5.0.0,!=5.0.1" ,
143+ " pandas!=0.25.0" ,
144+ " pikepdf" ,
145+ " pytz" ,
146+ " pywin32; sys_platform == 'win32'" ,
147+ " xarray" ,
148+ ]
149+
150+ # Extra pip requirements for the minimum-version CI run
151+ test-minver = [
152+ " contourpy==1.0.1" ,
153+ " cycler==0.10" ,
154+ " fonttools==4.22.0" ,
155+ " importlib-resources==3.2.0" ,
156+ " kiwisolver==1.3.2" ,
157+ " meson-python==0.13.1" ,
158+ " meson==1.1.0" ,
159+ " numpy==1.25.0" ,
160+ " packaging==20.0" ,
161+ " pillow==9.0.1" ,
162+ " pyparsing==3.0.0" ,
163+ " pytest==7.0.0" ,
164+ " python-dateutil==2.7" ,
165+ # Test ipython/matplotlib-inline before backend mapping moved to mpl.
166+ # This should be tested for a reasonably long transition period,
167+ # but we will eventually remove the test when we no longer support
168+ # ipython/matplotlib-inline versions from before the transition.
169+ " ipython==7.29.0" ,
170+ " ipykernel==5.5.6" ,
171+ " matplotlib-inline<0.1.7" ,
172+ ]
173+
174+ # Extra pip requirements for the GitHub Actions mypy build
175+ typing = [
176+ " mypy>=1.9" ,
177+ " typing-extensions>=4.6" ,
178+ # Extra stubs distributed separately from the main pypi package
179+ " pandas-stubs" ,
180+ " types-pillow" ,
181+ " types-python-dateutil" ,
182+ " types-psutil" ,
183+ " sphinx" ,
184+ {include-group = " build" },
185+ ]
186+
77187[tool .meson-python .args ]
78188install = [' --tags=data,python-runtime,runtime' ]
79189
0 commit comments