@@ -100,7 +100,8 @@ Matplotlib brings its own copies of the following libraries:
100100Additionally, Matplotlib depends on:
101101
102102- FreeType _ (>= 2.3): a font rendering library
103- - QHull _ (>= 2020.2): a library for computing triangulations
103+ - QHull _ (>= 8.0.2): a library for computing triangulations (note that this version is
104+ also known as 2020.2)
104105
105106.. _FreeType : https://www.freetype.org/
106107.. _Qhull : http://www.qhull.org/
@@ -113,24 +114,16 @@ defaults to the system version of FreeType on AIX.
113114Use system libraries
114115^^^^^^^^^^^^^^^^^^^^
115116
116- To force Matplotlib to use a copy of FreeType or Qhull already installed in
117- your system, create a :file: `mplsetup.cfg ` file with the following contents:
118-
119- .. code-block :: cfg
120-
121- [libs]
122- system_freetype = true
123- system_qhull = true
124-
125- before running
117+ To force Matplotlib to use a copy of FreeType or Qhull already installed in your system,
118+ you must `pass configuration settings to Meson via meson-python
119+ <https://meson-python.readthedocs.io/en/stable/how-to-guides/config-settings.html> `_:
126120
127121.. code-block :: sh
128122
129- python -m pip install .
130-
131-
132- You can also use the :envvar: `MPLSETUPCFG ` to specify the path to a cfg file when
133- installing from pypi.
123+ python -m pip install \
124+ --config-settings=setup-args=" -Dsystem-freetype=true" \
125+ --config-settings=setup-args=" -Dsystem-qhull=true" \
126+ .
134127
135128
136129 In this case, you need to install the FreeType and Qhull library and headers.
@@ -187,18 +180,12 @@ remember to clear your artifacts before re-building::
187180Manual Download
188181^^^^^^^^^^^^^^^
189182
190-
191- If the automatic download does not work (for example on air-gapped systems) it
192- is preferable to instead use system libraries. However you can manually
193- download and unpack the tarballs into::
194-
195- build/freetype-2.6.1 # on all platforms but windows ARM64
196- build/freetype-2.11.1 # on windows ARM64
197- build/qhull-2020.2
198-
199- at the top level of the checkout repository. The expected sha256 hashes of
200- the downloaded tarballs is in :file: `setupext.py ` if you wish to verify
201- before unpacking.
183+ If the automatic download does not work (for example, on air-gapped systems) it is
184+ preferable to instead use system libraries. However you can manually download the
185+ tarballs into :file: `subprojects/packagecache ` at the top level of the checkout
186+ repository. The expected SHA256 hashes of the downloaded tarballs are in
187+ :file: `subprojects/*.wrap ` if you wish to verify them, but they will also be checked by
188+ the build system before unpacking.
202189
203190
204191Minimum pip / manylinux support (linux)
@@ -207,7 +194,7 @@ Minimum pip / manylinux support (linux)
207194Matplotlib publishes `manylinux wheels <https://github.com/pypa/manylinux >`_
208195which have a minimum version of pip which will recognize the wheels
209196
210- - Python 3.9+: ``manylinx2014 `` / pip >= 19.3
197+ - Python 3.9+: ``manylinux2014 `` / pip >= 19.3
211198
212199In all cases the required version of pip is embedded in the CPython source.
213200
@@ -223,12 +210,18 @@ Dependencies for building Matplotlib
223210Setup dependencies
224211------------------
225212
226- - `certifi <https://pypi.org/project/certifi/ >`_ (>= 2020.06.20). Used while
227- downloading the freetype and QHull source during build. This is not a
228- runtime dependency.
213+ By default, ``pip `` will build packages using build isolation, and the following
214+ dependencies will be automatically installed in the isolated environment to build
215+ Matplotlib. However, for development, you may wish to make an editable install, which
216+ will require disabling build isolation, so these build dependencies should be installed
217+ in your target environment manually:
218+
219+ - `meson-python <https://meson-python.readthedocs.io/ >`_ (>= 0.13.1).
220+ - `ninja <https://ninja-build.org/ >`_ (>= 1.8.2). This may be available in your package
221+ manager or bundled with Meson, but may be installed via ``pip `` if otherwise not
222+ available.
229223- `PyBind11 <https://pypi.org/project/pybind11/ >`_ (>= 2.6). Used to connect C/C++ code
230224 with Python.
231- - `setuptools <https://pypi.org/project/setuptools/ >`_ (>= 64).
232225- `setuptools_scm <https://pypi.org/project/setuptools-scm/ >`_ (>= 7). Used to
233226 update the reported ``mpl.__version__ `` based on the current git commit.
234227 Also a runtime dependency for editable installs.
@@ -288,8 +281,6 @@ Xcode, VS Code or Linux package manager. Choose **one** compiler from this list:
288281 - Linux, macOS, Windows
289282 - `gcc 4.8.1 <https://gcc.gnu.org/projects/cxx-status.html#cxx11 >`_,
290283 `GCC: Binaries <https://gcc.gnu.org/install/binaries.html >`_,
291-
292- For gcc <6.5 you will need to set ``$CFLAGS=-std=c++11 `` to enable C++11 support.
293284 * - Clang (LLVM)
294285 - **3.3 **
295286 - Linux, macOS
@@ -330,8 +321,8 @@ testing the following will be used if they are installed.
330321- pytest-xvfb _ to run tests without windows popping up (Linux)
331322- pytz _ used to test pytz int
332323- sphinx _ used to test our sphinx extensions
333- - WenQuanYi Zen Hei and `Noto Sans CJK < https://fonts.google.com/noto/use >`_
334- fonts for testing font fallback and non-western fonts
324+ - ` WenQuanYi Zen Hei `_ and `Noto Sans CJK `_ fonts for testing font fallback and
325+ non-Western fonts
335326- xarray _ used to test compatibility with xarray
336327
337328If any of these dependencies are not discovered, then the tests that rely on
@@ -359,6 +350,8 @@ them will be skipped by pytest.
359350.. _pytest-xvfb : https://pypi.org/project/pytest-xvfb/
360351.. _pytest : http://doc.pytest.org/en/latest/
361352.. _sphinx : https://pypi.org/project/Sphinx/
353+ .. _WenQuanYi Zen Hei : http://wenq.org/en/
354+ .. _Noto Sans CJK : https://fonts.google.com/noto/use
362355.. _xarray : https://pypi.org/project/xarray/
363356
364357
0 commit comments