Skip to content

DOC: add note about manually downloading qhull + freetype #26408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion doc/devel/dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ necessary to run the test suite, because different versions of FreeType
rasterize characters differently) and of Qhull. As an exception, Matplotlib
defaults to the system version of FreeType on AIX.

Use system libraries
~~~~~~~~~~~~~~~~~~~~

To force Matplotlib to use a copy of FreeType or Qhull already installed in
your system, create a :file:`mplsetup.cfg` file with the following contents:

Expand All @@ -121,7 +124,16 @@ your system, create a :file:`mplsetup.cfg` file with the following contents:
system_freetype = true
system_qhull = true

before running ``python -m pip install .``.
before running

.. code-block:: sh

python -m pip install .


You can also use the :envvar:`MPLSETUPCFG` to specify the path to a cfg file when
installing from pypi.


In this case, you need to install the FreeType and Qhull library and headers.
This can be achieved using a package manager, e.g. for FreeType:
Expand Down Expand Up @@ -174,6 +186,23 @@ remember to clear your artifacts before re-building::
git clean -xfd


Manual Download
~~~~~~~~~~~~~~~


If the automatic download does not work (for example on air-gapped systems) it
is preferable to instead use system libraries. However you can manually
download and unpack the tarballs into::

build/freetype-2.6.1 # on all platforms but windows ARM64
build/freetype-2.11.1 # on windows ARM64
build/qhull-2020.2

at the top level of the checkout repository. The expected sha256 hashes of
the downloaded tarballs is in :file:`setupext.py` if you wish to verify
before unpacking.


Minimum pip / manylinux support (linux)
---------------------------------------

Expand Down
4 changes: 3 additions & 1 deletion setupext.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ def get_and_extract_tarball(urls, sha, dirname):
}
# This is the version of FreeType to use when building a local version. It
# must match the value in lib/matplotlib.__init__.py, and the cache path in
# `.circleci/config.yml`.
# `.circleci/config.yml`. Also update the docs in
# `docs/devel/dependencies.rst`.
TESTING_VERSION_OF_FREETYPE = '2.6.1'
if sys.platform.startswith('win') and platform.machine() == 'ARM64':
# older versions of freetype are not supported for win/arm64
Expand All @@ -193,6 +194,7 @@ def get_and_extract_tarball(urls, sha, dirname):
LOCAL_FREETYPE_HASH = _freetype_hashes.get(LOCAL_FREETYPE_VERSION, 'unknown')

# Also update the cache path in `.circleci/config.yml`.
# Also update the docs in `docs/devel/dependencies.rst`.
LOCAL_QHULL_VERSION = '2020.2'
LOCAL_QHULL_HASH = (
'b5c2d7eb833278881b952c8a52d20179eab87766b00b865000469a45c1838b7e')
Expand Down