-
Notifications
You must be signed in to change notification settings - Fork 104
Move the manual EXCLUDE_FROM_ALL inwards
#3111
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
base: master
Are you sure you want to change the base?
Conversation
ZedThree
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @LecrisUT !
|
Actually, this doesn't have the intended outcome because the |
|
As long as readthedocs still builds it fine, and it's documented how to build the docs locally, I think it's fine |
On that front, RTD does not use the cmake build, and the documentation does not mention how to use the |
|
Would it not be fine to just remove "EXCLUDE_FROM_ALL"? If you explicitly enable it, you should be fine with building it? If not, disable it? |
Technically, yes. The question is if you wish to maintain this build process. I have not found any benefits for running sphinx inside CMake, and it is a cleaner workflow for RTD and downstreams to run sphinx directly. But if you wish to keep it, I will accommodate that change. |
|
It does do more then just call sphinx, it also sets up the environment variables, so that python can pick up the python interface for BOUT++. I think that will be tricky to get right without cmake. For fedora this is of course no issue, as I know how to do it, and only need to script it once, but it will make things more tricky for others, that want to change some documentation that involves the python interface. @ZedThree What do you think? |
But the thing is, RTD or the makefile do not use it. They call python and doxygen directly. For the makefile, it does set the Line 4 in 1cd0fa7
And once more in the sphinx conf.pyBOUT-dev/manual/sphinx/conf.py Line 34 in 1cd0fa7
For documenting compiled python bindings, that is a different story, but I don't see them being documented anyhow. |
|
Ah, I remember. For RTD we do in-source-builds. There is even an extra option to allow that, but I do not want to recommend that to anybody that wants to keep working with the checkout ... in the examples we also have also |
Design wise it is indeed possible to make it work as optional build and install, the The thing that I want to highlight here is that sphinx is not benefiting from being run inside cmake and it is not an encouraged workflow. E.g. users and CI should be encouraged to use the sphinx executable directly so that they can add There is one usecase for sphinx inside the cmake for installing the html documentation for distro packages (even though it is not supported by sphinx), but even then the packager might choose to build a pdf or other formats which would need manual runs. Given all that, I'm happy to reverse course on this and change it to the |
|
I see, so I do not add an extra global option like this: Yes, if you have the time to do that, that would be great. |
Ah ok, didn't check that part. In that case indeed it would make sense to include some integration. I have a fairly complex design in mind which would allow to integrate more seamlessly from both sphinx and cmake side, and avoid the hacky method. I should have some time next week to show that. |
EXCLUDE_FROM_ALL inwards
|
For now, I've changed this PR to just move the If someone wants to discuss how to simplify the python bindings, I can offer various recommendations, which would resolve #2814 as well. |
Original issue is that
EXCLUDE_FROM_ALLconflicts with theinstall()command in that theCOMPONENTcannot be used since the whole folder is excluded. This makes installing the documentation quite cumbersome because of the build directory manipulations.On the other hand, the documentation building from CMake does not bring any advantages, and it is not documented. Instead the
makecould be used, and for doing the installation, on Fedora we use thisSee also: #3111 (comment)
Edit: In the end, reverting to the original issue approach