Skip to content

Commit 93b713b

Browse files
story645QuLogic
andcommitted
reduced redundancy in headings and
note required MinGW windows header version Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 parent 1d6f09f commit 93b713b

File tree

2 files changed

+63
-41
lines changed

2 files changed

+63
-41
lines changed

doc/devel/dependencies.rst

Lines changed: 62 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
.. _dependencies:
22

3-
============
3+
************
44
Dependencies
5-
============
5+
************
6+
7+
.. _runtime_dependencies:
68

79
Runtime dependencies
810
====================
911

1012

11-
Mandatory dependencies
12-
----------------------
13+
Required
14+
--------
1315

1416
When installing through a package manager like ``pip`` or ``conda``, the
1517
mandatory dependencies are automatically installed. This list is mainly for
@@ -31,8 +33,8 @@ reference.
3133

3234
.. _optional_dependencies:
3335

34-
Optional dependencies
35-
---------------------
36+
Optional
37+
--------
3638

3739
The following packages and tools are not required but extend the capabilities
3840
of Matplotlib.
@@ -106,10 +108,14 @@ Additionally, Matplotlib depends on:
106108
.. _FreeType: https://www.freetype.org/
107109
.. _Qhull: http://www.qhull.org/
108110

109-
By default, Matplotlib downloads and builds its own copies of FreeType (this is
110-
necessary to run the test suite, because different versions of FreeType
111-
rasterize characters differently) and of Qhull. As an exception, Matplotlib
112-
defaults to the system version of FreeType on AIX.
111+
112+
Download during install
113+
^^^^^^^^^^^^^^^^^^^^^^^
114+
115+
By default, Matplotlib downloads and builds its own copies of Qhull and FreeType.
116+
The vendored version of FreeType is necessary to run the test suite, because
117+
different versions of FreeType rasterize characters differently.
118+
113119

114120
Use system libraries
115121
^^^^^^^^^^^^^^^^^^^^
@@ -176,9 +182,8 @@ remember to clear your artifacts before re-building::
176182

177183
git clean -xfd
178184

179-
180-
Manual Download
181-
^^^^^^^^^^^^^^^
185+
From source files
186+
^^^^^^^^^^^^^^^^^
182187

183188
If the automatic download does not work (for example, on air-gapped systems) it is
184189
preferable to instead use system libraries. However you can manually download the
@@ -202,19 +207,21 @@ In all cases the required version of pip is embedded in the CPython source.
202207

203208
.. _development-dependencies:
204209

205-
Dependencies for building Matplotlib
206-
====================================
210+
Build dependencies
211+
==================
212+
207213

208214
.. _setup-dependencies:
209215

210-
Setup dependencies
211-
------------------
216+
Python
217+
------
212218

213219
By default, ``pip`` will build packages using build isolation, and the following
214220
dependencies will be automatically installed in the isolated environment to build
215221
Matplotlib. However, for development, you may wish to make an editable install, which
216222
will require disabling build isolation, so these build dependencies should be installed
217-
in your target environment manually:
223+
in the target environment manually.
224+
:
218225

219226
- `meson-python <https://meson-python.readthedocs.io/>`_ (>= 0.13.1).
220227
- `ninja <https://ninja-build.org/>`_ (>= 1.8.2). This may be available in your package
@@ -227,14 +234,21 @@ in your target environment manually:
227234
Also a runtime dependency for editable installs.
228235
- `NumPy <https://numpy.org>`_ (>= 1.21). Also a runtime dependency.
229236

237+
.. note::
238+
239+
The Python packages listed here will be installed automatically if you are using
240+
a virtual environment that was created following the instructions in :ref:`dev-environment`.
241+
230242

231243
.. _compile-dependencies:
232244

233-
C++ compiler
245+
C-extensions
234246
------------
235247

236248
Matplotlib requires a C++ compiler that supports C++17, and each platform has a
237249
development environment that must be installed before a compiler can be installed.
250+
You may also need to install headers for various libraries called in the C-extension
251+
source files.
238252

239253
.. tab-set::
240254

@@ -261,6 +275,8 @@ development environment that must be installed before a compiler can be installe
261275

262276
Alternatively, you can install a Linux-like environment such as `CygWin <https://www.cygwin.com/>`_
263277
or `Windows Subsystem for Linux <https://learn.microsoft.com/en-us/windows/wsl/install>`_.
278+
If using `MinGW-64 <https://www.mingw-w64.org/>`_, we require **v6** of the
279+
```Mingw-w64-x86_64-headers``.
264280

265281

266282
We highly recommend that you install a compiler using your platform tool, i.e.,
@@ -294,16 +310,19 @@ Xcode, VS Code or Linux package manager. Choose **one** compiler from this list:
294310

295311
.. _test-dependencies:
296312

297-
Dependencies for testing Matplotlib
298-
===================================
313+
Test dependencies
314+
=================
315+
299316
This section lists the additional software required for
300317
:ref:`running the tests <testing>`.
301318

302-
Required:
319+
Required
320+
--------
303321

304322
- pytest_ (>= 7.0.0)
305323

306-
Optional:
324+
Optional
325+
--------
307326

308327
In addition to all of the optional dependencies on the main library, for
309328
testing the following will be used if they are installed.
@@ -357,11 +376,12 @@ them will be skipped by pytest.
357376

358377
.. _doc-dependencies:
359378

360-
Dependencies for building Matplotlib's documentation
361-
====================================================
379+
Documentation dependencies
380+
==========================
381+
382+
Python
383+
------
362384

363-
Python packages
364-
---------------
365385
The additional Python packages required to build the
366386
:ref:`documentation <documenting-matplotlib>` are listed in
367387
:file:`doc-requirements.txt` and can be installed using ::
@@ -373,13 +393,22 @@ The content of :file:`doc-requirements.txt` is also shown below:
373393
.. include:: ../../requirements/doc/doc-requirements.txt
374394
:literal:
375395

376-
Additional external dependencies
377-
--------------------------------
378-
Required:
379396

397+
External tools
398+
--------------
399+
400+
The documentation requires LaTeX and Graphviz. These are not
401+
Python packages and must be installed separately. The documentation can be
402+
built without Inkscape and optipng, but the build process will raise various
403+
warnings. If the build process warns that you are missing fonts, make sure
404+
your LaTeX distribution bundles cm-super or install it separately.
405+
406+
Required
407+
^^^^^^^^
408+
409+
* `Graphviz <http://www.graphviz.org/download>`_
380410
* a minimal working LaTeX distribution, e.g., `TeX Live <https://www.tug.org/texlive/>`_ or
381411
`MikTeX <https://miktex.org/>`_
382-
* `Graphviz <http://www.graphviz.org/download>`_
383412
* the following LaTeX packages (if your OS bundles TeX Live, the
384413
"complete" version of the installer, e.g. "texlive-full" or "texlive-all",
385414
will often automatically include these packages):
@@ -388,18 +417,11 @@ Required:
388417
* `dvipng <https://ctan.org/pkg/dvipng>`_
389418
* `underscore <https://ctan.org/pkg/underscore>`_
390419

391-
Optional, but recommended:
420+
Optional
421+
^^^^^^^^
392422

393423
* `Inkscape <https://inkscape.org>`_
394424
* `optipng <http://optipng.sourceforge.net>`_
395425
* the font "Humor Sans" (aka the "XKCD" font), or the free alternative
396426
`Comic Neue <http://comicneue.com/>`_
397427
* the font "Times New Roman"
398-
399-
.. note::
400-
401-
The documentation will not build without LaTeX and Graphviz. These are not
402-
Python packages and must be installed separately. The documentation can be
403-
built without Inkscape and optipng, but the build process will raise various
404-
warnings. If the build process warns that you are missing fonts, make sure
405-
your LaTeX distribution bundles cm-super or install it separately.

doc/users/installing/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ precompiled wheel for your OS and Python.
3131

3232
For support of other GUI frameworks, LaTeX rendering, saving
3333
animations and a larger selection of file formats, you can
34-
install :ref:`optional_dependencies`.
34+
install :ref:`optional dependencies <optional_dependencies>`.
3535

3636

3737
Third-party distributions

0 commit comments

Comments
 (0)