Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a280b73

Browse files
committed
Move docs on dependencies and conda packages from installation guide to
devdocs
1 parent fbe82bb commit a280b73

File tree

4 files changed

+155
-148
lines changed

4 files changed

+155
-148
lines changed

INSTALL.rst

Lines changed: 0 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -135,148 +135,6 @@ file will be particularly useful to those packaging Matplotlib.
135135

136136
.. _setup.cfg: https://raw.githubusercontent.com/matplotlib/matplotlib/master/setup.cfg.template
137137

138-
.. _install_requirements:
139-
140-
Dependencies
141-
------------
142-
143-
Matplotlib will automatically install dependencies when you install with
144-
``pip``, so this section is mostly for your reference.
145-
146-
Matplotlib requires the following dependencies:
147-
148-
* `Python <https://www.python.org/downloads/>`_ (>= 3.7)
149-
* `NumPy <https://numpy.org>`_ (>= 1.16)
150-
* `setuptools <https://setuptools.readthedocs.io/en/latest/>`_
151-
* `cycler <https://matplotlib.org/cycler/>`_ (>= 0.10.0)
152-
* `dateutil <https://pypi.org/project/python-dateutil>`_ (>= 2.7)
153-
* `kiwisolver <https://github.com/nucleic/kiwi>`_ (>= 1.0.1)
154-
* `Pillow <https://pillow.readthedocs.io/en/latest/>`_ (>= 6.2)
155-
* `pyparsing <https://pypi.org/project/pyparsing/>`_ (>=2.2.1)
156-
157-
Optionally, you can also install a number of packages to enable better user
158-
interface toolkits. See :ref:`what-is-a-backend` for more details on the
159-
optional Matplotlib backends and the capabilities they provide.
160-
161-
* Tk_ (>= 8.3, != 8.6.0 or 8.6.1): for the Tk-based backends.
162-
* PyQt4_ (>= 4.6) or PySide_ (>= 1.0.3) [#]_: for the Qt4-based backends.
163-
* PyQt5_ or PySide2_: for the Qt5-based backends.
164-
* PyGObject_: for the GTK3-based backends [#]_.
165-
* wxPython_ (>= 4) [#]_: for the wx-based backends.
166-
* pycairo_ (>= 1.11.0) or cairocffi_ (>= 0.8): for the GTK3 and/or cairo-based
167-
backends.
168-
* Tornado_: for the WebAgg backend.
169-
170-
.. _Tk: https://docs.python.org/3/library/tk.html
171-
.. _PyQt4: https://pypi.org/project/PyQt4
172-
.. _PySide: https://pypi.org/project/PySide
173-
.. _PyQt5: https://pypi.org/project/PyQt5
174-
.. _PySide2: https://pypi.org/project/PySide2
175-
.. _PyGObject: https://pygobject.readthedocs.io/en/latest/
176-
.. _wxPython: https://www.wxpython.org/
177-
.. _pycairo: https://pycairo.readthedocs.io/en/latest/
178-
.. _cairocffi: https://cairocffi.readthedocs.io/en/latest/
179-
.. _Tornado: https://pypi.org/project/tornado
180-
181-
.. [#] PySide cannot be pip-installed on Linux (but can be conda-installed).
182-
.. [#] If using pip (and not conda), PyGObject must be built from source; see
183-
https://pygobject.readthedocs.io/en/latest/devguide/dev_environ.html.
184-
.. [#] If using pip (and not conda) on Linux, wxPython wheels must be manually
185-
downloaded from https://wxpython.org/pages/downloads/.
186-
187-
For better support of animation output format and image file formats, LaTeX,
188-
etc., you can install the following:
189-
190-
* `ffmpeg <https://www.ffmpeg.org/>`_: for saving movies.
191-
* `ImageMagick <https://www.imagemagick.org/script/index.php>`_: for saving
192-
animated gifs.
193-
* `LaTeX <https://www.latex-project.org/>`_ (with `cm-super
194-
<https://ctan.org/pkg/cm-super>`__ ) and `GhostScript (>=9.0)
195-
<https://ghostscript.com/download/>`_ : for rendering text with
196-
LaTeX.
197-
* `fontconfig <https://www.fontconfig.org>`_ (>= 2.7): for detection of system
198-
fonts on Linux.
199-
200-
FreeType and Qhull
201-
------------------
202-
203-
Matplotlib depends on FreeType_ (>= 2.3), a font rendering library, and on
204-
Qhull_ (>= 2020.2), a library for computing triangulations. By default,
205-
Matplotlib downloads and builds its own copies of FreeType (this is necessary
206-
to run the test suite, because different versions of FreeType rasterize
207-
characters differently) and of Qhull. As an exception, Matplotlib defaults to
208-
the system version of FreeType on AIX.
209-
210-
.. _FreeType: https://www.freetype.org/
211-
.. _Qhull: http://www.qhull.org/
212-
213-
To force Matplotlib to use a copy of FreeType or Qhull already installed in
214-
your system, create a :file:`setup.cfg` file with the following contents:
215-
216-
.. code-block:: cfg
217-
218-
[libs]
219-
system_freetype = true
220-
system_qhull = true
221-
222-
before running ``python -m pip install .``.
223-
224-
In this case, you need to install the FreeType and Qhull library and headers.
225-
This can be achieved using a package manager, e.g. for FreeType:
226-
227-
.. code-block:: sh
228-
229-
# Pick ONE of the following:
230-
sudo apt install libfreetype6-dev # Debian/Ubuntu
231-
sudo dnf install freetype-devel # Fedora
232-
brew install freetype # macOS with Homebrew
233-
conda install freetype # conda, any OS
234-
235-
(adapt accordingly for Qhull).
236-
237-
On Linux and macOS, it is also recommended to install pkg-config_, a helper
238-
tool for locating FreeType:
239-
240-
.. code-block:: sh
241-
242-
# Pick ONE of the following:
243-
sudo apt install pkg-config # Debian/Ubuntu
244-
sudo dnf install pkgconf # Fedora
245-
brew install pkg-config # macOS with Homebrew
246-
conda install pkg-config # conda
247-
# Or point the PKG_CONFIG environment variable to the path to pkg-config:
248-
export PKG_CONFIG=...
249-
250-
.. _pkg-config: https://www.freedesktop.org/wiki/Software/pkg-config/
251-
252-
If not using pkg-config (in particular on Windows), you may need to set the
253-
include path (to the library headers) and link path (to the libraries)
254-
explicitly, if they are not in standard locations. This can be done using
255-
standard environment variables -- on Linux and OSX:
256-
257-
.. code-block:: sh
258-
259-
export CFLAGS='-I/directory/containing/ft2build.h'
260-
export LDFLAGS='-L/directory/containing/libfreetype.so'
261-
262-
and on Windows:
263-
264-
.. code-block:: bat
265-
266-
set CL=/IC:\directory\containing\ft2build.h
267-
set LINK=/LIBPATH:C:\directory\containing\freetype.lib
268-
269-
.. note::
270-
271-
Matplotlib always uses its own copies of the following libraries:
272-
273-
- ``Agg``: the Anti-Grain Geometry C++ rendering engine;
274-
- ``ttconv``: a TrueType font utility.
275-
276-
If you go this route but need to reset and rebuild to change your settings,
277-
remember to clear your artifacts before re-building::
278-
279-
git clean -xfd
280138

281139
Building on Windows
282140
-------------------
@@ -286,9 +144,3 @@ Visual Studio 2015 or later.
286144

287145
If you are building your own Matplotlib wheels (or sdists), note that any DLLs
288146
that you copy into the source tree will be packaged too.
289-
290-
Conda packages
291-
--------------
292-
293-
The conda packaging scripts for Matplotlib are available at
294-
https://github.com/conda-forge/matplotlib-feedstock.

doc/devel/dependencies.rst

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
.. _install_requirements:
2+
3+
============
4+
Dependencies
5+
============
6+
7+
Matplotlib will automatically install dependencies when you install with
8+
``pip``, so this section is mostly for your reference.
9+
10+
Matplotlib requires the following dependencies:
11+
12+
* `Python <https://www.python.org/downloads/>`_ (>= 3.7)
13+
* `NumPy <https://numpy.org>`_ (>= 1.16)
14+
* `setuptools <https://setuptools.readthedocs.io/en/latest/>`_
15+
* `cycler <https://matplotlib.org/cycler/>`_ (>= 0.10.0)
16+
* `dateutil <https://pypi.org/project/python-dateutil>`_ (>= 2.7)
17+
* `kiwisolver <https://github.com/nucleic/kiwi>`_ (>= 1.0.1)
18+
* `Pillow <https://pillow.readthedocs.io/en/latest/>`_ (>= 6.2)
19+
* `pyparsing <https://pypi.org/project/pyparsing/>`_ (>=2.2.1)
20+
21+
Optionally, you can also install a number of packages to enable better user
22+
interface toolkits. See :ref:`what-is-a-backend` for more details on the
23+
optional Matplotlib backends and the capabilities they provide.
24+
25+
* Tk_ (>= 8.3, != 8.6.0 or 8.6.1): for the Tk-based backends.
26+
* PyQt4_ (>= 4.6) or PySide_ (>= 1.0.3) [#]_: for the Qt4-based backends.
27+
* PyQt5_ or PySide2_: for the Qt5-based backends.
28+
* PyGObject_: for the GTK3-based backends [#]_.
29+
* wxPython_ (>= 4) [#]_: for the wx-based backends.
30+
* pycairo_ (>= 1.11.0) or cairocffi_ (>= 0.8): for the GTK3 and/or cairo-based
31+
backends.
32+
* Tornado_: for the WebAgg backend.
33+
34+
.. _Tk: https://docs.python.org/3/library/tk.html
35+
.. _PyQt4: https://pypi.org/project/PyQt4
36+
.. _PySide: https://pypi.org/project/PySide
37+
.. _PyQt5: https://pypi.org/project/PyQt5
38+
.. _PySide2: https://pypi.org/project/PySide2
39+
.. _PyGObject: https://pygobject.readthedocs.io/en/latest/
40+
.. _wxPython: https://www.wxpython.org/
41+
.. _pycairo: https://pycairo.readthedocs.io/en/latest/
42+
.. _cairocffi: https://cairocffi.readthedocs.io/en/latest/
43+
.. _Tornado: https://pypi.org/project/tornado
44+
45+
.. [#] PySide cannot be pip-installed on Linux (but can be conda-installed).
46+
.. [#] If using pip (and not conda), PyGObject must be built from source; see
47+
https://pygobject.readthedocs.io/en/latest/devguide/dev_environ.html.
48+
.. [#] If using pip (and not conda) on Linux, wxPython wheels must be manually
49+
downloaded from https://wxpython.org/pages/downloads/.
50+
51+
For better support of animation output format and image file formats, LaTeX,
52+
etc., you can install the following:
53+
54+
* `ffmpeg <https://www.ffmpeg.org/>`_: for saving movies.
55+
* `ImageMagick <https://www.imagemagick.org/script/index.php>`_: for saving
56+
animated gifs.
57+
* `LaTeX <https://www.latex-project.org/>`_ (with `cm-super
58+
<https://ctan.org/pkg/cm-super>`__ ) and `GhostScript (>=9.0)
59+
<https://ghostscript.com/download/>`_ : for rendering text with
60+
LaTeX.
61+
* `fontconfig <https://www.fontconfig.org>`_ (>= 2.7): for detection of system
62+
fonts on Linux.
63+
64+
FreeType and Qhull
65+
------------------
66+
67+
Matplotlib depends on FreeType_ (>= 2.3), a font rendering library, and on
68+
Qhull_ (>= 2020.2), a library for computing triangulations. By default,
69+
Matplotlib downloads and builds its own copies of FreeType (this is necessary
70+
to run the test suite, because different versions of FreeType rasterize
71+
characters differently) and of Qhull. As an exception, Matplotlib defaults to
72+
the system version of FreeType on AIX.
73+
74+
.. _FreeType: https://www.freetype.org/
75+
.. _Qhull: http://www.qhull.org/
76+
77+
To force Matplotlib to use a copy of FreeType or Qhull already installed in
78+
your system, create a :file:`setup.cfg` file with the following contents:
79+
80+
.. code-block:: cfg
81+
82+
[libs]
83+
system_freetype = true
84+
system_qhull = true
85+
86+
before running ``python -m pip install .``.
87+
88+
In this case, you need to install the FreeType and Qhull library and headers.
89+
This can be achieved using a package manager, e.g. for FreeType:
90+
91+
.. code-block:: sh
92+
93+
# Pick ONE of the following:
94+
sudo apt install libfreetype6-dev # Debian/Ubuntu
95+
sudo dnf install freetype-devel # Fedora
96+
brew install freetype # macOS with Homebrew
97+
conda install freetype # conda, any OS
98+
99+
(adapt accordingly for Qhull).
100+
101+
On Linux and macOS, it is also recommended to install pkg-config_, a helper
102+
tool for locating FreeType:
103+
104+
.. code-block:: sh
105+
106+
# Pick ONE of the following:
107+
sudo apt install pkg-config # Debian/Ubuntu
108+
sudo dnf install pkgconf # Fedora
109+
brew install pkg-config # macOS with Homebrew
110+
conda install pkg-config # conda
111+
# Or point the PKG_CONFIG environment variable to the path to pkg-config:
112+
export PKG_CONFIG=...
113+
114+
.. _pkg-config: https://www.freedesktop.org/wiki/Software/pkg-config/
115+
116+
If not using pkg-config (in particular on Windows), you may need to set the
117+
include path (to the library headers) and link path (to the libraries)
118+
explicitly, if they are not in standard locations. This can be done using
119+
standard environment variables -- on Linux and OSX:
120+
121+
.. code-block:: sh
122+
123+
export CFLAGS='-I/directory/containing/ft2build.h'
124+
export LDFLAGS='-L/directory/containing/libfreetype.so'
125+
126+
and on Windows:
127+
128+
.. code-block:: bat
129+
130+
set CL=/IC:\directory\containing\ft2build.h
131+
set LINK=/LIBPATH:C:\directory\containing\freetype.lib
132+
133+
.. note::
134+
135+
Matplotlib always uses its own copies of the following libraries:
136+
137+
- ``Agg``: the Anti-Grain Geometry C++ rendering engine;
138+
- ``ttconv``: a TrueType font utility.
139+
140+
If you go this route but need to reset and rebuild to change your settings,
141+
remember to clear your artifacts before re-building::
142+
143+
git clean -xfd

doc/devel/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ process or how to fix something feel free to ask on `gitter
4040
gitwash/index.rst
4141
coding_guide.rst
4242
release_guide.rst
43+
dependencies.rst
4344
min_dep_policy.rst
4445
MEP/index
4546

doc/devel/release_guide.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,3 +382,14 @@ In addition, announcements should be made on social networks (twitter
382382
via the ``@matplotlib`` account, any other via personal accounts).
383383
`NumFOCUS <https://numfocus.org/>`__ should be contacted for
384384
inclusion in their newsletter.
385+
386+
387+
Conda packages
388+
==============
389+
390+
The conda packaging scripts for Matplotlib are hosted at
391+
https://github.com/conda-forge/matplotlib-feedstock.
392+
393+
This is for information only. The conda packages are not released by the
394+
Matplotlib project but by third parties. In particular, the Matplotlib release
395+
manager is not responsible for conda packaging.

0 commit comments

Comments
 (0)