@@ -91,17 +91,40 @@ Installing from source
9191
9292If you are interested in contributing to Matplotlib development,
9393running the latest source code, or just like to build everything
94- yourself, it is not difficult to build Matplotlib from source. Grab
95- the latest *tar.gz * release file from `the PyPI files page
96- <https://pypi.org/project/matplotlib/> `_, or if you want to
97- develop Matplotlib or just need the latest bugfixed version, grab the
98- latest git version, and see :ref: `install-from-git `.
94+ yourself, it is not difficult to build Matplotlib from source.
95+
96+ The easiest way to get the latest development version to start contributing
97+ is to go to the git `repository <https://github.com/matplotlib/matplotlib >`_
98+ and run: ::
99+
100+ git clone https://github.com/matplotlib/matplotlib.git
99101
100102Matplotlib can be installed from the source directory with a simple ::
101103
102- python -m pip install .
104+ pip install .
105+
106+ If you're developing, it's better to do it in editable mode. The reason why
107+ is that there's a few artifacts for testing that are only properly referenced
108+ if installation is done this way. Also, editable mode allows your code changes
109+ to be instantly propagated to your library code without rebuilding (though
110+ you will have to restart your kernel): ::
111+
112+ pip install -e .
113+
114+ Additionally, if you are planning on contributing, you may need additional
115+ dev dependencies: ::
116+
117+ pip install -r requirements/dev/dev.txt
103118
104- We provide a setup.cfg _ file which you can use to customize the build
119+ **Warning: ** The following instructions in this section are for very custom
120+ installations of Matplotlib. Proceed with caution because these instructions
121+ may result in your build producing unexpected behavior and/or causing
122+ local testing to fail.
123+
124+ If you would like to build from a tarball, grab the latest *tar.gz * release
125+ file from `the PyPI files page <https://pypi.org/project/matplotlib/ >`_.
126+
127+ We provide a `setup.cfg `_ file which you can use to customize the build
105128process. For example, which default backend to use, whether some of the
106129optional libraries that Matplotlib ships with are installed, and so on. This
107130file will be particularly useful to those packaging Matplotlib.
@@ -113,6 +136,9 @@ file will be particularly useful to those packaging Matplotlib.
113136Dependencies
114137------------
115138
139+ Matplotlib will automatically install dependencies when you install with
140+ `pip `, so this section is mostly for your reference.
141+
116142Matplotlib requires the following dependencies:
117143
118144* `Python <https://www.python.org/downloads/ >`_ (>= 3.6)
@@ -240,6 +266,11 @@ and on Windows:
240266 - ``Agg ``: the Anti-Grain Geometry C++ rendering engine;
241267 - ``ttconv ``: a TrueType font utility.
242268
269+ If you go this route but need to reset and rebuild to change your settings,
270+ remember to clear your artifacts before re-building: ::
271+
272+ git clean -xfd
273+
243274Building on Windows
244275-------------------
245276
0 commit comments