Skip to content

Conversation

tobiasdiez
Copy link
Contributor

@tobiasdiez tobiasdiez commented Apr 19, 2025

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

  • 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

@user202729
Copy link
Contributor

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'))
Copy link
Contributor

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?

Copy link
Contributor Author

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 🦊

Copy link

github-actions bot commented May 17, 2025

Documentation preview for this PR (built with commit 3408887; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@tobiasdiez tobiasdiez marked this pull request as ready for review May 17, 2025 10:23
@tobiasdiez
Copy link
Contributor Author

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.

@dimpase
Copy link
Member

dimpase commented May 17, 2025

https://github.com/sagemath/sage/actions/runs/15081532937/job/42398821050#step:9:1

fails while building docs the old way - is it normal?

@tobiasdiez
Copy link
Contributor Author

It fails with

ImportError: libSingular-4.4.0.so: cannot open shared object file: No such file or directory

https://github.com/sagemath/sage/actions/runs/15081532937/job/42398821050#step:9:3982 so this is the same problem as for the other PRs.

@dimpase
Copy link
Member

dimpase commented May 17, 2025

no, my question was - why does that CI run build docs the old way?

@antonio-rojas
Copy link
Contributor

antonio-rojas commented Jul 10, 2025

but then I hit the second error:

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 cachefunc.pyx source file where the @cached_method decorator is defined is not accessible, then autodoc chokes when parsing any method decorated with it.

I guess this is another point in favor of installing pyx files.

vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 14, 2025
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
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 18, 2025
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
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 26, 2025
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
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 26, 2025
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
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 27, 2025
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
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 28, 2025
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
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 29, 2025
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
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 1, 2025
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
@user202729
Copy link
Contributor

bad news. CI doc build on develop is failing.

FAILED: [code=1] src/doc/htmlfunctions 
/usr/share/miniconda/envs/sage-dev/bin/python3.11 /home/runner/work/sage/sage/src/build-docs.py --no-pdf-links reference/functions html -o src/doc --source /home/runner/work/sage/sage/src/doc
Deleting empty directory /home/runner/work/sage/sage/src/doc/en/reference/function_fields/sage/rings/function_field
Error building the documentation.
Traceback (most recent call last):
  File "/home/runner/work/sage/sage/src/build-docs.py", line 11, in <module>
    main()
  File "/home/runner/work/sage/sage/src/sage_docbuild/__main__.py", line 543, in main
    os.rmdir(dirpath)
FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/sage/sage/src/doc/en/reference/function_fields/sage/rings/function_field'

which makes the documentation diff on each pull request so large it's almost useless.

https://github.com/sagemath/sage/actions/runs/16763031702/job/47462517197

some race condition maybe?

vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 12, 2025
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
- sagemath#40071
<!-- 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
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 13, 2025
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
- sagemath#40071
<!-- 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
@user202729 user202729 mentioned this pull request Aug 15, 2025
5 tasks
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 17, 2025
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
- sagemath#40071
<!-- 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
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 17, 2025
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
- sagemath#40071
<!-- 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
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 17, 2025
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
- sagemath#40071
<!-- 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
@jhpalmieri
Copy link
Member

Was there a particular reason for breaking "sage --docbuild -D" and "sage --docbuild -F"? Please fix this.

@jhpalmieri
Copy link
Member

And maybe add some doctests to tests/cmdline.py to catch this.

@dimpase
Copy link
Member

dimpase commented Aug 23, 2025

the main reason to break it is #39030 - the sooner we move all that to Meson, the better.

@jhpalmieri
Copy link
Member

Fix it and then you can remove it once #39030 is in place.

@dimpase
Copy link
Member

dimpase commented Aug 23, 2025

@jhpalmieri - please feel free to review #40588 - which does just this.

vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 31, 2025
<!-- ^ 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
- sagemath#40071
- sagemath#40597
<!-- 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, François Bissey, Tobias Diez
vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 1, 2025
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
- sagemath#40071
- sagemath#40597
<!-- 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, François Bissey, Tobias Diez
vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 4, 2025
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
- sagemath#40071
- sagemath#40597
<!-- 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, François Bissey, Tobias Diez
vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 16, 2025
sagemathgh-40686: Install pyx sources with meson
    
Currently the meson build doesn't install the pyx source files, as
opposed to the setuptools build. This has caused/is causing several
issues:
- The method `sage_getsource` as well as ipython's own source viewer
`??` don't work for cython methods. This creates an inconsistency with
python methods, and breaks several tests when the sage source is not
available (eg. distro packages).
- It breaks the doc builder
sagemath#39973 (comment)
- It used to cause issues when accessing some methods
(sagemath#39735), now worked around.

The only reason why these issues are not present in sage-the-distro is
that cython wrongly embeds the absolute paths of source files, which
masks the issues as long as the source is present in its original
location. But as soon as cython/cython#6755 is
released this will affect all types of sage build.

In any case, I believe being able to inspect the methods implementation
from the sage interface itself is a valuable feature for mathematicians,
which are its main user base.

I have only done one dir so far so I don't waste my time in case this is
rejected or a different implementation is proposed. I will do the rest
when I get the OK.

Fixes sagemath#39874
    
URL: sagemath#40686
Reported by: Antonio Rojas
Reviewer(s): Tobias Diez
vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 19, 2025
sagemathgh-40686: Install pyx sources with meson
    
Currently the meson build doesn't install the pyx source files, as
opposed to the setuptools build. This has caused/is causing several
issues:
- The method `sage_getsource` as well as ipython's own source viewer
`??` don't work for cython methods. This creates an inconsistency with
python methods, and breaks several tests when the sage source is not
available (eg. distro packages).
- It breaks the doc builder
sagemath#39973 (comment)
- It used to cause issues when accessing some methods
(sagemath#39735), now worked around.

The only reason why these issues are not present in sage-the-distro is
that cython wrongly embeds the absolute paths of source files, which
masks the issues as long as the source is present in its original
location. But as soon as cython/cython#6755 is
released this will affect all types of sage build.

In any case, I believe being able to inspect the methods implementation
from the sage interface itself is a valuable feature for mathematicians,
which are its main user base.

I have only done one dir so far so I don't waste my time in case this is
rejected or a different implementation is proposed. I will do the rest
when I get the OK.

Fixes sagemath#39874
    
URL: sagemath#40686
Reported by: Antonio Rojas
Reviewer(s): Tobias Diez
@user202729 user202729 mentioned this pull request Oct 4, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants