@@ -99,7 +99,7 @@ toolchain is prefixed. This may be used for cross compiling. ::
99
99
export PKG_CONFIG=x86_64-pc-linux-gnu-pkg-config
100
100
101
101
Once you have satisfied the requirements detailed below (mainly
102
- Python, NumPy, libpng and FreeType), you can build Matplotlib.
102
+ Python, NumPy, and FreeType), you can build Matplotlib.
103
103
::
104
104
105
105
cd matplotlib
@@ -121,7 +121,6 @@ Matplotlib requires the following dependencies:
121
121
122
122
* `Python <https://www.python.org/downloads/ >`_ (>= 3.6)
123
123
* `FreeType <https://www.freetype.org/ >`_ (>= 2.3)
124
- * `libpng <http://www.libpng.org >`_ (>= 1.2)
125
124
* `NumPy <http://www.numpy.org >`_ (>= 1.11)
126
125
* `setuptools <https://setuptools.readthedocs.io/en/latest/ >`_
127
126
* `cycler <http://matplotlib.org/cycler/ >`_ (>= 0.10.0)
@@ -177,8 +176,8 @@ etc., you can install the following:
177
176
.. _pkg-config : https://www.freedesktop.org/wiki/Software/pkg-config/
178
177
179
178
If not using pkg-config (in particular on Windows), you may need to set the
180
- include path (to the FreeType, libpng, and zlib headers) and link path (to
181
- the FreeType, libpng, and zlib libraries) explicitly, if they are not in
179
+ include path (to the FreeType and zlib headers) and link path (to
180
+ the FreeType and zlib libraries) explicitly, if they are not in
182
181
standard locations. This can be done using standard environment variables
183
182
-- on Linux and OSX:
184
183
@@ -195,8 +194,8 @@ etc., you can install the following:
195
194
set LINK = /LIBPATH:C:\directory\containing\freetype.lib ...
196
195
197
196
where ``... `` means "also give, in the same format, the directories
198
- containing ``png.h `` and `` zlib.h `` for the include path, and for
199
- ``libpng.so ``/`` png.lib `` and `` libz.so ``/``z.lib `` for the link path."
197
+ containing ``zlib.h `` for the include path, and for
198
+ ``libz.so ``/``z.lib `` for the link path."
200
199
201
200
.. note ::
202
201
@@ -237,20 +236,20 @@ Building on macOS
237
236
-----------------
238
237
239
238
The build situation on macOS is complicated by the various places one
240
- can get the libpng and FreeType requirements (MacPorts, Fink,
239
+ can get FreeType (MacPorts, Fink,
241
240
/usr/X11R6), the different architectures (e.g., x86, ppc, universal), and
242
241
the different macOS versions (e.g., 10.4 and 10.5). We recommend that you build
243
242
the way we do for the macOS release: get the source from the tarball or the
244
243
git repository and install the required dependencies through a third-party
245
244
package manager. Two widely used package managers are Homebrew, and MacPorts.
246
- The following example illustrates how to install libpng and FreeType using
245
+ The following example illustrates how to install FreeType using
247
246
``brew ``::
248
247
249
- brew install libpng freetype pkg-config
248
+ brew install freetype pkg-config
250
249
251
250
If you are using MacPorts, execute the following instead::
252
251
253
- port install libpng freetype pkgconfig
252
+ port install freetype pkgconfig
254
253
255
254
After installing the above requirements, install Matplotlib from source by
256
255
executing::
@@ -274,7 +273,7 @@ https://packaging.python.org/guides/packaging-binary-extensions/#setting-up-a-bu
274
273
for how to set up a build environment.
275
274
276
275
Since there is no canonical Windows package manager, the methods for building
277
- FreeType, zlib, and libpng from source code are documented as a build script
276
+ FreeType and zlib from source code are documented as a build script
278
277
at `matplotlib-winbuild <https://github.com/jbmohler/matplotlib-winbuild >`_.
279
278
280
279
There are a few possibilities to build Matplotlib on Windows:
@@ -290,17 +289,16 @@ Wheel builds using conda packages
290
289
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
291
290
292
291
This is a wheel build, but we use conda packages to get all the requirements.
293
- The binary requirements (png, FreeType,...) are statically linked and therefore
294
- not needed during the wheel install.
292
+ FreeType is statically linked and therefore not needed during the wheel install.
295
293
296
294
Set up the conda environment. Note, if you want a qt backend, add ``pyqt `` to
297
295
the list of conda packages.
298
296
299
297
::
300
298
301
- conda create -n "matplotlib_build" python=3.7 numpy python-dateutil pyparsing tornado cycler tk libpng zlib freetype
299
+ conda create -n "matplotlib_build" python=3.7 numpy python-dateutil pyparsing tornado cycler tk zlib freetype
302
300
conda activate matplotlib_build
303
- # force the build against static libpng and zlib libraries
301
+ # force the build against static zlib libraries
304
302
set MPLSTATICBUILD=True
305
303
python setup.py bdist_wheel
306
304
0 commit comments