8000 added cloning, pip -e, git clean, dev.txt · matplotlib/matplotlib@19f7f4b · GitHub
[go: up one dir, main page]

Skip to content

Commit 19f7f4b

Browse files
Pamela Wutacaswell
Pamela Wu
authored andcommitted
added cloning, pip -e, git clean, dev.txt
1 parent 9f78b84 commit 19f7f4b

File tree

2 files changed

+57
-7
lines changed

2 files changed

+57
-7
lines changed

INSTALL.rst

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,40 @@ Installing from source
9191

9292
If you are interested in contributing to Matplotlib development,
9393
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.
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

100102
Matplotlib 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
105128
process. For example, which default backend to use, whether some of the
106129
optional libraries that Matplotlib ships with are installed, and so on. This
107130
file will be particularly useful to those packaging Matplotlib.
@@ -113,6 +136,9 @@ file will be particularly useful to those packaging Matplotlib.
113136
Dependencies
114137
------------
115138

139+
Matplotlib will automatically install dependencies when you install with
140+
`pip`, so this section is mostly for your reference.
141+
116142
Matplotlib 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+
243274
Building on Windows
244275
-------------------
245276

requirements/dev/dev.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
coverage
2+
cycler
3+
flake8>=3.7
4+
flake8-docstrings
5+
ipykernel
6+
nbconvert[execute]
7+
numpy
8+
pillow
9+
pydocstyle<4.0
10+
pyparsing
11+
pytest!=4.6.0
12+
pytest-cov
13+
pytest-rerunfailures
14+
pytest-timeout
15+
pytest-xdist
16+
python-dateutil
17+
pytz
18+
tornado
19+
tox

0 commit comments

Comments
 (0)
0