@@ -91,17 +91,42 @@ Installing from source
91
91
92
92
If you are interested in contributing to Matplotlib development,
93
93
running 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.
99
95
100
- Matplotlib can be installed from the source directory with a simple ::
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
101
+
102
+ If you're developing, it's better to do it in editable mode. The reason why
103
+ is that pytest's test discovery only works for Matplotlib
104
+ if installation is done this way. Also, editable mode allows your code changes
105
+ to be instantly propagated to your library code without reinstalling (though
106
+ you will have to restart your python process / kernel)::
107
+
108
+ python -m pip install -e .
109
+
110
+ If you're not developing, it can be installed from the source directory with
111
+ a simple::
101
112
102
113
python -m pip install .
103
114
104
- We provide a setup.cfg _ file which you can use to customize the build
115
+ To run the tests you will need to install some additional dependencies::
116
+
117
+ python -m pip install -r requirements/dev/dev-requirements.txt
118
+
119
+ .. warning ::
120
+
121
+ The following instructions in this section are for very custom
122
+ installations of Matplotlib. Proceed with caution because these instructions
123
+ may result in your build producing unexpected behavior and/or causing
124
+ local testing to fail.
125
+
126
+ If you would like to build from a tarball, grab the latest *tar.gz * release
127
+ file from `the PyPI files page <https://pypi.org/project/matplotlib/ >`_.
128
+
129
+ We provide a `setup.cfg `_ file which you can use to customize the build
105
130
process. For example, which default backend to use, whether some of the
106
131
optional libraries that Matplotlib ships with are installed, and so on. This
107
132
file will be particularly useful to those packaging Matplotlib.
@@ -113,6 +138,9 @@ file will be particularly useful to those packaging Matplotlib.
113
138
Dependencies
114
139
------------
115
140
141
+ Matplotlib will automatically install dependencies when you install with
142
+ ``pip ``, so this section is mostly for your reference.
143
+
116
144
Matplotlib requires the following dependencies:
117
145
118
146
* `Python <https://www.python.org/downloads/ >`_ (>= 3.6)
@@ -240,6 +268,11 @@ and on Windows:
240
268
- ``Agg ``: the Anti-Grain Geometry C++ rendering engine;
241
269
- ``ttconv ``: a TrueType font utility.
242
270
271
+ If you go this route but need to reset and rebuild to change your settings,
272
+ remember to clear your artifacts before re-building::
273
+
274
+ git clean -xfd
275
+
243
276
Building on Windows
244
277
-------------------
245
278
0 commit comments