@@ -32,10 +32,10 @@ alongside matplotlib. This MEP aims to resolve some problems with
3232that approach, bring some consistency, while continuing to make
3333installation convenient.
3434
35- At the time that was initially done, ` setuptools `, ` easy_install ` and
36- ` PyPI ` were not mature enough to be relied on. However, at present,
35+ At the time that was initially done, setuptools _, easy_install _ and
36+ PyPI _ were not mature enough to be relied on. However, at present,
3737we should be able to safely leverage the "modern" versions of those
38- tools, ` distribute ` and ` pip ` .
38+ tools, distribute _ and pip _ .
3939
4040While matplotlib has dependencies on both Python libraries and C/C++
4141libraries, this MEP addresses only the Python libraries so as to not
@@ -59,38 +59,38 @@ matplotlib depends on the following third-party Python libraries:
5959Current behavior
6060----------------
6161
62- When installing from source, a `git ` checkout or ` pip ` :
62+ When installing from source, a :program: `git ` checkout or pip _ :
6363
64- - `setup.py ` attempts to `import numpy `. If this fails, the
64+ - :file: `setup.py ` attempts to `` import numpy ` `. If this fails, the
6565 installation fails.
6666
67- - For each of ` dateutil `, ` pytz ` and ` six ` , `setup.py ` attempts to
67+ - For each of dateutil _, pytz _ and six _ , `setup.py ` attempts to
6868 import them (from the top-level namespace). If that fails,
6969 matplotlib installs its local copy of the library into the
7070 top-level namespace.
7171
72- - ` pyparsing ` is always installed inside of the matplotlib
72+ - pyparsing _ is always installed inside of the matplotlib
7373 namespace.
7474
75- This behavior is most surprising when used with ` pip ` , because no
76- ` pip ` dependency resolution is performed, even though it is likely to
75+ This behavior is most surprising when used with pip _ , because no
76+ pip _ dependency resolution is performed, even though it is likely to
7777work for all of these packages.
7878
79- The fact that ` pyparsing ` is installed in the matplotlib namespace has
79+ The fact that pyparsing _ is installed in the matplotlib namespace has
8080reportedly (#1290) confused some users into thinking it is a
8181matplotlib-related module and import it from there rather than the
8282top-level.
8383
84- When installing using the Windows installer, ` dateutil `, ` pytz ` and
85- ` six ` are installed at the top-level *always *, potentially overwriting
84+ When installing using the Windows installer, dateutil _, pytz _ and
85+ six _ are installed at the top-level *always *, potentially overwriting
8686already installed copies of those libraries.
8787
8888TODO: Describe behavior with the OS-X installer.
8989
9090When installing using a package manager (Debian, RedHat, MacPorts
9191etc.), this behavior actually does the right thing, and there are no
9292special patches in the matplotlib packages to deal with the fact that
93- we handle ` dateutil `, ` pytz ` and ` six ` in this way. However, care
93+ we handle dateutil _, pytz _ and six _ in this way. However, care
9494should be taken that whatever approach we move to continues to work in
9595that context.
9696
@@ -104,9 +104,9 @@ Desired behavior
104104----------------
105105
106106Third-party dependencies are downloaded and installed from their
107- canonical locations by leveraging ` pip `, ` distribute ` and ` PyPI ` .
107+ canonical locations by leveraging pip _, distribute _ and PyPI _ .
108108
109- ` dateutil `, ` pytz ` , and ` pyparsing ` should be made into optional
109+ dateutil _, pytz _ , and pyparsing _ should be made into optional
110110dependencies -- though obviously some features would fail if they
111111aren't installed. This will allow the user to decide whether they
112112want to bother installing a particular feature.
@@ -116,31 +116,31 @@ Implementation
116116
117117For installing from source, and assuming the user has all of the
118118C-level compilers and dependencies, this can be accomplished fairly
119- easily using ` distribute ` and following the instructions `here
119+ easily using distribute _ and following the instructions `here
120120<https://pypi.python.org/pypi/distribute> `_. The only anticipated
121- change to the matplotlib library code will be to import ` pyparsing `
121+ change to the matplotlib library code will be to import pyparsing _
122122from the top-level namespace rather than from within matplotlib. Note
123- that ` distribute ` will also allow us to remove the direct dependency
124- on ` six ` , since it is, strictly speaking, only a direct dependency of
125- ` dateutil ` .
123+ that distribute _ will also allow us to remove the direct dependency
124+ on six _ , since it is, strictly speaking, only a direct dependency of
125+ dateutil _ .
126126
127127For binary installations, there are a number of alternatives (here
128128ordered from best/hardest to worst/easiest):
129129
130130 1. The distutils wininst installer allows a post-install script to
131- run. It might be possible to get this script to run ` pip ` to
131+ run. It might be possible to get this script to run pip _ to
132132 install the other dependencies. (See `this thread
133133 <http://grokbase.com/t/python/distutils-sig/109bdnfhp4/distutils-ann-setuptools-post-install-script-for-bdist-wininst> `_
134134 for someone who has trod that ground before).
135135
136- 2. Continue to ship ` dateutil `, ` pytz `, ` six ` and ` pyparsing ` in
136+ 2. Continue to ship dateutil _, pytz _, six _ and pyparsing _ in
137137 our installer, but use the post-install-script to install them
138138 *only * if they can not already be found.
139139
140140 3. Move all of these packages inside a (new) `matplotlib.extern `
141141 namespace so it is clear for outside users that these are
142142 external packages. Add some conditional imports in the core
143- matplotlib codebase so ` dateutil ` (at the top-level) is tried
143+ matplotlib codebase so dateutil _ (at the top-level) is tried
144144 first, and failing that `matplotlib.extern.dateutil ` is used.
145145
1461462 and 3 are undesirable as they still require maintaining copies of
@@ -164,7 +164,17 @@ accessing the network).
164164Alternatives
165165============
166166
167- Distributing binary ` eggs ` doesn't feel like a usable solution. That
168- requires getting ` easy_install ` installed first, and Windows users
169- generally prefer the well known `.exe ` or `.msi ` installer that works
167+ Distributing binary eggs doesn't feel like a usable solution. That
168+ requires getting easy_install _ installed first, and Windows users
169+ generally prefer the well known `` .exe `` or `` .msi ` ` installer that works
170170out of the box.
171+
172+ .. _PyPI : https://pypi.org
173+ .. _dateutil : https://pypi.org/project/python-dateutil/
174+ .. _distribute : https://pypi.org/project/distribute/
175+ .. _pip : https://pypi.org/project/pip/
176+ .. _pyparsing : https://pypi.org/project/pyparsing/
177+ .. _pytz : https://pypi.org/project/pytz/
178+ .. _setuptools : https://pypi.org/project/setuptools/
179+ .. _six : https://pypi.org/project/six/
180+ .. _easy_install : https://setuptools.readthedocs.io/en/latest/easy_install.html
0 commit comments