-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
matplotlib dependency cycle matplotlib <- ipython <- matplotlib - how to resolve? #7264
Comments
There's no dependency in either direction. Let's ask pip:
Let's ask conda:
Closing, but feel free to continue the discussion. |
A possible source of confusion is that I think ipython is needed for building the docs? |
I strongly suspect that this is an error in the guix packaging |
ipython is indeed needed for building the matplotlib docs - thus it is a (build-time) dependency. The build fails if I remove it. @anntzer: Do I understand you correctly that you suggest we should remove the dependency "ipython requires matplotlib" ? Doesn't that break anything? Edit: yes, it does: Could not import extension matplotlib.sphinxext.mathmpl (exception: No module named matplotlib.sphinxext.mathmpl) Also, there's an extra cycle: python-ipython requires python-numpy requires python-matplotlib requires python-ipython |
ipython issue: ipython/ipython#10003 |
I think the normal way to solve this is to have separate matplotlib-doc and ipython-doc packages, which both depend on the (docless) matplotlib and ipython packages. Clearly it hasn't created any problems for conda (or for Arch Linux packaging, FWIW) to declare the (doc-less) packages as independent from each other. |
Both ipython and mpl have conditional imports of the other in the main code base, but both can be used without the other. Both seem to depend on the other for doc building. I suggest either making a seperate doc package as @anntzer suggests or to run the builds once without the docs and then once you have built binary packages, restore the docs and then bootstrap your self. |
Yeah, we'll do one of those. I'll talk to the others about it. But do you agree that this is not an ideal situation? It would be better if they didn't depend on each other (and in the past, they didn't). For example, what does the matplotlib doc builder do with ipython? |
It highlights IPython sessions, as in http://matplotlib.org/users/shell.html?highlight=ipython#ipython-to-the-rescue (the pygments syntax is provided by ipython). Honestly I don't see why you'd want bundling the docs with the default build anyways... |
Packaging the docs is reasonable, means that you get nice off-line docs, but the mpl docs are pretty big (size wise). |
I'm not sure that IPython actually uses mpl much for the docs build. Extensions may have been introduced before the big split and never cleaned up. I'd want to check more carefully before removing the extensions, but the only things I could find with a bit of grepping were a few uses of the |
As I suspected, the IPython doc build doesn't really need matplotlib; ipython/ipython#10022 removes the matplotlib extensions. |
I'm trying to update the package matplotlib from 1.4.3 to 1.5.3 in the Guix distribution (I'm writing the package definition).
In the course of that I got into a reference cycle because matplotlib needs ipython. ipython needs matplotlib. How best to proceed?
The text was updated successfully, but these errors were encountered: