-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Use sys.executable -msphinx instead of sphinx-build. #8269
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
Conversation
I am +0 on this patch. We're making things complicated because people use conda without understanding the underlying python packaging system. We're putting duck tape instead of teaching people about paths and imports. |
Nelle - I don't think this is a conda-specific patch. I've certainly hit this where I'm working in a virtualenv, and I accidentally call a sphinx installed into the system or user directories. |
wait… You don't set up virtualenv to be a completely independant environment ? |
(Anyhow, I am not against this patch, but I don't think we are solving the underlying problem). |
Well |
It's a question of which one comes first in the path. The local one should always come before /usr/bin. Technically, it should not be a problem unless sphinx is not installed in the local one. If it is not installed in the local one, then users are having exactly the same problem as running an ipython shell outside of the environment, or pip outside of the environment. |
IPython actually has code to specifically handle that case, which prints a warning and tries to manipulate the PATH correctly (init_virtualenv in interactiveshell.py).
venvs created by |
Nelle - when I use |
I am 👍 on this. |
As a side note, if we up the dependency on sphinx to 1.3 (which is needed for this to work, and part of the PR), that also means we have sphinx.ext.napoleon available which can be used instead of numpydoc. |
See #5743 (in need of update, though.) |
See #8208 for rationale (using
sys.executable
instead ofpython
is the same idea).python -msphinx
is implemented since sphinx 1.3 (sphinx-doc/sphinx@74c7a52).