-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Doc build path varies between setup.py build_docs and make html #4133
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
Depending on the build method the output directory is not the same: - `docs/_build/html` with `make html` in the docs directory - `build/sphinx/html` with `setup.py build_docs`
|
I've noticed also that that changed, but I'm not entirely sure why it did. I don't think it was intentional, and it may be something that changed actually in Sphinx. I agree it's confusing, and would rather it just go to docs/_build (or alternatively, "build/docs", but not "build/sphinx" since that's hard to find...). I'm not sure about running |
|
I have no preference between the two ways to build the docs, but if |
|
Looking at the build_sphinx command implementation, it seems to also assume that the docs are going to be output to I'd be okay with removing the makefile--I never use it and see no reason to have more than one way to do it. I need to double check whether or not that's necessary for readthedocs though. It might be. |
|
To clarify, all the makefile itself really does is run the sphinx-build command with the correct options. Whereas the advantage to |
|
I've in the past used the makefile when I needed to debug sphinx failures. Sphinx can (with the right options) drop you into the debugger when it encounters an error. Could I do that with |
|
@hamogu - it seems |
|
Just realized the origin of this problem: So the install docs are just wrong, first of all. But also we should either add a |
|
Ah, I think we switched to recommending |
|
Ohh, didn't know that. Guess I'm the dinosaur, then. But then it's been broken since then because it's definitely wrong in a lot of ways to be going into |
|
But yes indeed, we need to update |
|
... maybe that's that other @eteq that keeps merging things when I'm not looking? ;) |
|
Ah, you have a sentient bot too? |
|
Oh, good catch @eteq ! |
|
Also, from the discussion above, we should remove the Makefile and have only one way to build the docs. |
|
@saimn - personally I'm +0 to removing the makefile - I don't really care about it, but I think some others expect it. But I see your point that it is clearly causing some confusion. Maybe make a separate issue/PR to do that and we can decide there? (this issue was auto-closed by #5156, which fixed the underlying problem of the |
`make html` does not work on Python 3, and there should be only one way to
build the docs (`setup.py build_docs`) and avoid to confuse users:
Exception occurred:
File "conf.py", line 43, in <module>
from astropy_helpers.sphinx.conf import *
ImportError: No module named 'astropy_helpers.sphinx'
Ref astropy#4133, astropy#2532


When using a classic
make htmlinside the doc directory, the doc is build indocs/_build/html.But when using
python setup.py build_docsas stated in the install page the output path isbuild/sphinx/htmlwhich is quite confusing. I had an old version of the doc in the first directory, which was not updated when running build_docs.The
build/sphinx/path seems to come fromsphinx.setup_command.BuildDoc, maybe it could modified inAstropyBuildSphinxtodocs/_build/and have the same output drectory asmake html?Futhermore
make htmlis broken for me with Python 3.4. This is related to #2532, but in my case, with python 3 and an install in develop mode,import astropy_helpersworks because the astropy_helpers directory is inside the astropy one pointed by the .egg-link, but it returns an invalid module:With the following patch I can use
make htmlin the docs directory, but it is just more hackish :