You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I missed #7229 but after discussing with @NelleV I would like to suggest another approach for working on the dev version of matplotlib, that I have always used myself.
I personally think that editable installs are pretty bad because you get the worst of both worlds: you mess up your everyday-use install (or you have to work in a {v,conda}env -- if anything I think suggesting setting up such an environment should come first, not as "you may want to consider ..."), and you still need to remember to build extensions every once in a while. (See extensive discussion in #7229.)
Instead, you can simply run python setup.py build_ext --inplace and then do whatever you want prefixed with PYTHONPATH=/path/to/mpl/lib.
I will readily acknowledge that there is one flaw with this approach: until recently, you could not work on the mpl_toolkits namespace package by setting PYTHONPATH, because the -nspkg.pth approach used by setuptools for namespace packages meant that PYTHONPATH would be ignored (see e.g. https://mail.python.org/pipermail/distutils-sig/2014-March/024050.html). Fortunately, this issue has been solved recently by setuptools 28.3.0 (https://github.com/pypa/setuptools/blob/master/CHANGES.rst#v2830): for Python3.3+, setuptools just relies on PEP420 support, which does respect PYTHONPATH.
Instead, you can simply run python setup.py build_ext --inplace and then do whatever you want prefixed with PYTHONPATH=/path/to/mpl/lib.
Thank you @anntzer, this approach is a solution to problems I have been annoyed by for some time (e.g. #3959).
Maybe this is the wrong place, but let me point out that currently http://matplotlib.org/devel/index.html (Developer's Guide) does not mention that an installation/compilation is required before you can actually do something with your local fork.
I suggest adding your approach to the Developer's Guide, since it's easy and, more importantly, easily revertible.
@tacaswell I think a link like the one suggested by you would not only help, but even make the process of setting matplotlib up for development understandable for some people who would be stuck otherwise.
It would be also good to note that to contribute to the documentation (either the example or the rst) this is not required, but if that makes it awkward don't worry about it.
Activity
jniediek commentedon Nov 11, 2016
Thank you @anntzer, this approach is a solution to problems I have been annoyed by for some time (e.g. #3959).
Maybe this is the wrong place, but let me point out that currently http://matplotlib.org/devel/index.html (Developer's Guide) does not mention that an installation/compilation is required before you can actually do something with your local fork.
I suggest adding your approach to the Developer's Guide, since it's easy and, more importantly, easily revertible.
@NelleV @tacaswell
tacaswell commentedon Nov 11, 2016
I agree that using environments should be more strongly encouraged, but I am nervous about encouraging direct use of
PYTHONPATH.@jniediek The installation instructions http://matplotlib.org/users/installing.html#installing-from-source have all of those details. Would an explicit link to that help?
jniediek commentedon Nov 16, 2016
@tacaswell I think a link like the one suggested by you would not only help, but even make the process of setting matplotlib up for development understandable for some people who would be stuck otherwise.
tacaswell commentedon Nov 16, 2016
The specific task for this issue is to:
It would be also good to note that to contribute to the documentation (either the example or the rst) this is not required, but if that makes it awkward don't worry about it.
jniediek commentedon Nov 16, 2016
Thanks for quick reply. Should I attempt at making these changes? And was your last sentence incomplete?
tacaswell commentedon Nov 16, 2016
@jniediek Please do and yes
patniharshit commentedon Feb 17, 2017
Since jniedlek hasn't responded back so i would like to do this.
tacaswell commentedon Feb 17, 2017
@patniharshit 👍
jniediek commentedon Feb 18, 2017
@patniharshit 👍
patniharshit commentedon Feb 18, 2017
Where to write it? In matplotlib/doc/devel/contributing.rst and then linking it in matplotlib/doc/devel/index.rst ?
story645 commentedon Apr 28, 2017
Sure! Explain it as part of why you need to retrieved the code. And that's already linked in index.rst