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

Skip to content

Commit 4fe9110

Browse files
committed
Fully switch from setup.py install to pip.
1 parent 380088f commit 4fe9110

File tree

3 files changed

+17
-21
lines changed

3 files changed

+17
-21
lines changed

INSTALL.rst

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Installing an official release
2222
Matplotlib and most of its dependencies are all available as wheel
2323
packages for macOS, Windows and Linux distributions::
2424

25-
python -m pip install -U pip
26-
python -m pip install -U matplotlib
25+
python -mpip install -U pip
26+
python -mpip install -U matplotlib
2727

2828
.. note::
2929

@@ -150,16 +150,14 @@ Python, NumPy, libpng and FreeType), you can build Matplotlib.
150150
::
151151

152152
cd matplotlib
153-
python setup.py build
154-
python setup.py install
153+
python -mpip install .
155154

156-
We provide a `setup.cfg
157-
<https://raw.githubusercontent.com/matplotlib/matplotlib/master/setup.cfg.template>`_
158-
file that goes with :file:`setup.py` which you can use to customize
159-
the build process. For example, which default backend to use, whether
160-
some of the optional libraries that Matplotlib ships with are
161-
installed, and so on. This file will be particularly useful to those
162-
packaging Matplotlib.
155+
We provide a setup.cfg_ file which you can use to customize the build
156+
process. For example, which default backend to use, whether some of the
157+
optional libraries that Matplotlib ships with are installed, and so on. This
158+
file will be particularly useful to those packaging Matplotlib.
159+
160+
.. _setup.cfg: https://raw.githubusercontent.com/matplotlib/matplotlib/master/setup.cfg.template
163161

164162
If you have installed prerequisites to nonstandard places and need to
165163
inform Matplotlib where they are, edit ``setupext.py`` and add the base
@@ -282,7 +280,7 @@ If you are using MacPorts, execute the following instead::
282280
After installing the above requirements, install Matplotlib from source by
283281
executing::
284282

285-
python setup.py install
283+
python -mpip install .
286284

287285
Note that your environment is somewhat important. Some conda users have
288286
found that, to run the tests, their PYTHONPATH must include

doc/devel/contributing.rst

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,33 +90,32 @@ the env ``MPLLOCALFREETYPE`` as::
9090

9191
export MPLLOCALFREETYPE=1
9292

93-
or copy :file:`setup.cfg.template` to :file:`setup.cfg` and edit it to contain ::
93+
or copy :file:`setup.cfg.template` to :file:`setup.cfg` and edit it to contain
94+
::
9495

9596
[test]
9697
local_freetype = True
9798

98-
9999
To install Matplotlib (and compile the c-extensions) run the following
100100
command from the top-level directory ::
101101

102-
pip install -v -e ./
102+
pip install -ve .
103103

104104
This installs Matplotlib in 'editable/develop mode', i.e., builds
105105
everything and places the correct link entries in the install
106106
directory so that python will be able to import Matplotlib from the
107107
source directory. Thus, any changes to the ``*.py`` files will be
108108
reflected the next time you import the library. If you change the
109-
c-extension source (which might happen if you change branches) you
109+
C-extension source (which might happen if you change branches) you
110110
will need to run::
111111

112112
python setup.py build
113113

114-
or re-run ``pip install -v -e ./``.
115-
114+
or re-run ``pip install -ve .``.
116115

117116
Alternatively, if you do ::
118117

119-
pip install -v ./
118+
pip install -v .
120119

121120
all of the files will be copied to the installation directory however,
122121
you will have to rerun this command every time the source is changed.
@@ -132,7 +131,6 @@ environment is set up properly::
132131

133132
python tests.py
134133

135-
136134
.. _pytest: http://doc.pytest.org/en/latest/
137135
.. _pep8: https://pep8.readthedocs.io/en/latest/
138136
.. _mock: https://docs.python.org/dev/library/unittest.mock.html

doc/faq/troubleshooting_faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ mode::
155155
rm -rf /path/to/site-packages/matplotlib*
156156
git clean -xdf
157157
git pull
158-
python setup.py install > build.out
158+
python -mpip install -v . > build.out
159159
python examples/pylab_examples/simple_plot.py --verbose-debug > run.out
160160

161161
and post :file:`build.out` and :file:`run.out` to the `matplotlib-devel

0 commit comments

Comments
 (0)