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
{{ message }}
Repository navigation
make.py should not use os.system("sphinx-build ...") #8208
I know the plan is to switch to a doc makefile, but the issue would be the same.
Calling os.system("sphinx-build ...") (or directly sphinx-build in the Makefile) will pick up a sphinx install outside of the current environment, which may or may not have an unrelated (e.g., older) version of matplotlib installed. Instead, the command should be something like python -msphinx build ... if sphinx offers that option, or we should use a wrapper script otherwise that makes sure that sphinx is used from the current environment only.
I don't understand your concern; why would it pick up sphinx-build outside the environment? If the environment didn't install the executable and modify PATH, then something is wrong with the environment.
There is a problem on Python 3 though if using system packages, because they generally install both sphinx-build and sphinx-build-3. This is handled by the Makefile using a modifiable variable SPHINXBUILD which can be set when calling make: make SPHINXBUILD=sphinx-build-3.
It's quite common in my experience for me to have sphinx-build installed on the system, or in my user installs, and for that to get picked up when I am working inside a virtualenv, on which I have not installed sphinx. That can be pretty confusing.
Oh yes, not having it installed at all, good point. We can fix this now, but I think there's not really much of a way to fix this when switching to the Makefile, though.
Perhaps we can just check since when this form is supported and update the requirement. I will open an issue upstream to fix their Makefile/make.bat as well.
Activity
matthew-brett commentedon Mar 6, 2017
Looking at the contents of
sphinx-build, you could probably get away with something like:QuLogic commentedon Mar 6, 2017
I don't understand your concern; why would it pick up
sphinx-buildoutside the environment? If the environment didn't install the executable and modifyPATH, then something is wrong with the environment.There is a problem on Python 3 though if using system packages, because they generally install both
sphinx-buildandsphinx-build-3. This is handled by the Makefile using a modifiable variableSPHINXBUILDwhich can be set when calling make:make SPHINXBUILD=sphinx-build-3.matthew-brett commentedon Mar 6, 2017
It's quite common in my experience for me to have
sphinx-buildinstalled on the system, or in my user installs, and for that to get picked up when I am working inside a virtualenv, on which I have not installed sphinx. That can be pretty confusing.QuLogic commentedon Mar 6, 2017
Oh yes, not having it installed at all, good point. We can fix this now, but I think there's not really much of a way to fix this when switching to the Makefile, though.
anntzer commentedon Mar 7, 2017
Actually, as of sphinx 1.5.3, you can just do
Perhaps we can just check since when this form is supported and update the requirement. I will open an issue upstream to fix their Makefile/make.bat as well.
anntzer commentedon Mar 7, 2017
xref sphinx-doc/sphinx#3523
anntzer commentedon Mar 27, 2017
Closed by #8269.