-
-
Notifications
You must be signed in to change notification settings - Fork 642
Migrate CI build-doc to Meson #39973
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
Looks like some file permission goes wrong? (symbolic link get converted to normal file?) |
docs = [doc[1] for doc in sorted(documents)] | ||
# Put the bibliography first, because it needs to be built first: | ||
docs.remove(Path('reference/references')) | ||
docs.insert(0, Path('reference/references')) |
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.
Why is such a large change necessary in this file?
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.
To be honest, I got carried a way a bit: the strictly necessary change is to remove mentions of import sage
, then I used the chance to use pathlib, and to catch all those paths vs strings issues added typing info. Oh, and there were a few old deprecated stuff in there which was easier to remove than to migrate to pathlib 🦊
Documentation preview for this PR (built with commit 3408887; changes) is ready! 🎉 |
Doc build is working now, and the changes relative to the last develop build seem to be minimal and mostly due to using a newer sphinx version now. Marking it as blocker since currently the docbuild CI for other PRs is completely failing. |
https://github.com/sagemath/sage/actions/runs/15081532937/job/42398821050#step:9:1 fails while building docs the old way - is it normal? |
It fails with
https://github.com/sagemath/sage/actions/runs/15081532937/job/42398821050#step:9:3982 so this is the same problem as for the other PRs. |
no, my question was - why does that CI run build docs the old way? |
Thanks for the review @dimpase. I've created new issues for the problems you mentioned. @user202729 This is fixed in #40071 |
sagemathgh-39973: Migrate CI build-doc to Meson <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> Make it possible to build the documentation with meson via ``` meson compile -C builddir doc-html ``` For this a couple of changes was necessary in the docbuilder: - Make `sage_docbuild` independent of `sage` so that meson can use `sage_docbuild` during config time to construct all the docbuild targets (otherwise one needs to first install sage, and then could configure the docbuild) - Properly handle input and output dirs for the docbuild, without relying on magic sage env variables ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [ ] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#39973 Reported by: Tobias Diez Reviewer(s): Dima Pasechnik, Tobias Diez, user202729
I can't figure out how to build the documentation now. I used to do
which no longer works since the
then I get errors such as
since sage hasn't been compiled. Even if I compile it with
I get the same error, since the compiled modules aren't available in the python path. The closest I get is if I delete the sage source dir and replace it with a symlink to the installed sage python module, but then I get cryptic errors such as
So how do I do it? |
perhaps it's better to look at #39030, which is basically done, and converted sagelib build and docs build to using meson |
Sorry for the inconvenience! Looking forward, I was wondering if it's better to move the |
Thanks, that helps. The path shuffing from #40379 allows the build to proceed, but then I hit the second error:
and the same for a few other files. Adding that warning to the ignore list in Another issue is that the compiled docs are not using mathjax (not even the online version), they look like this: |
The mathjax issue is not caused by this change, but by the fact that #40388 should fix this and other potential future issues. In the long term we should fix the env.py/config.py duplication and centralize the variable settings and fallbacks in a single place. |
Sorry, I've never seen that error before and it also looks a bit like an internal sphinx error. |
I figured out the issue: this is (again) caused by missing pyx sources. Specifically, if the I guess this is another point in favor of installing pyx files. |
sagemathgh-39030: Use meson in sage-the-distro <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> Replace the old setuptools-based build by the new meson-based one in sage-the-distro. Delete most of the old stuff that is no longer needed now. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [ ] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies - sagemath#40133 - sagemath#39973 <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#39030 Reported by: Tobias Diez Reviewer(s): Dima Pasechnik
sagemathgh-39030: Use meson in sage-the-distro <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> Replace the old setuptools-based build by the new meson-based one in sage-the-distro. Delete most of the old stuff that is no longer needed now. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [ ] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies - sagemath#40133 - sagemath#39973 <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#39030 Reported by: Tobias Diez Reviewer(s): Dima Pasechnik
sagemathgh-40379: Fix docbuilding on release tag <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> After sagemath#39973, some necessary steps during the docbuild on release tags are no longer run (see https://github.com/sagemath/sage/actions/runs/161 00707903/job/45429461356). Sorry - that was my fault. This is fixed here. Test run: https://github.com/tobiasdiez/sage/actions/runs/16323033505/jo b/46105684396 ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [ ] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> - sagemath#40383 URL: sagemath#40379 Reported by: Tobias Diez Reviewer(s): Dima Pasechnik
sagemathgh-40379: Fix docbuilding on release tag <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> After sagemath#39973, some necessary steps during the docbuild on release tags are no longer run (see https://github.com/sagemath/sage/actions/runs/161 00707903/job/45429461356). Sorry - that was my fault. This is fixed here. Test run: https://github.com/tobiasdiez/sage/actions/runs/16323033505/jo b/46105684396 ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [ ] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> - sagemath#40383 URL: sagemath#40379 Reported by: Tobias Diez Reviewer(s): Dima Pasechnik
sagemathgh-40379: Fix docbuilding on release tag <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> After sagemath#39973, some necessary steps during the docbuild on release tags are no longer run (see https://github.com/sagemath/sage/actions/runs/161 00707903/job/45429461356). Sorry - that was my fault. This is fixed here. Test run: https://github.com/tobiasdiez/sage/actions/runs/16323033505/jo b/46105684396 ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [ ] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> - sagemath#40383 URL: sagemath#40379 Reported by: Tobias Diez Reviewer(s): Dima Pasechnik
sagemathgh-40379: Fix docbuilding on release tag <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> After sagemath#39973, some necessary steps during the docbuild on release tags are no longer run (see https://github.com/sagemath/sage/actions/runs/161 00707903/job/45429461356). Sorry - that was my fault. This is fixed here. Test run: https://github.com/tobiasdiez/sage/actions/runs/16323033505/jo b/46105684396 ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [ ] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> - sagemath#40383 URL: sagemath#40379 Reported by: Tobias Diez Reviewer(s): Dima Pasechnik
sagemathgh-40379: Fix docbuilding on release tag <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> After sagemath#39973, some necessary steps during the docbuild on release tags are no longer run (see https://github.com/sagemath/sage/actions/runs/161 00707903/job/45429461356). Sorry - that was my fault. This is fixed here. Test run: https://github.com/tobiasdiez/sage/actions/runs/16323033505/jo b/46105684396 ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [ ] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> - sagemath#40383 URL: sagemath#40379 Reported by: Tobias Diez Reviewer(s): Dima Pasechnik
sagemathgh-40379: Fix docbuilding on release tag <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> After sagemath#39973, some necessary steps during the docbuild on release tags are no longer run (see https://github.com/sagemath/sage/actions/runs/161 00707903/job/45429461356). Sorry - that was my fault. This is fixed here. Test run: https://github.com/tobiasdiez/sage/actions/runs/16323033505/jo b/46105684396 ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [ ] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> - sagemath#40383 URL: sagemath#40379 Reported by: Tobias Diez Reviewer(s): Dima Pasechnik
Make it possible to build the documentation with meson via
For this a couple of changes was necessary in the docbuilder:
sage_docbuild
independent ofsage
so that meson can usesage_docbuild
during config time to construct all the docbuild targets (otherwise one needs to first install sage, and then could configure the docbuild)📝 Checklist
⌛ Dependencies