Skip to content
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

Add sage-generate-meson script to sage-setup #37008

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from

Conversation

mkoeppe
Copy link
Contributor

@mkoeppe mkoeppe commented Jan 4, 2024

The script was taken from:

... where it was called generate-meson.py and intended to be removed before merging. #36524 (comment)

Here we make it available as a script installed by sage_setup because what was useful once for generating code will be useful later for updating code, in particular as will be necessary for modularization concerns, as discussed in #36524 (comment)

Various improvements have been made. When invoked with the switch --monolithic, the output maintains compatibility with #36524.

Author: @tobiasdiez, @mkoeppe

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • 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 accordingly.

⌛ Dependencies

@mkoeppe mkoeppe self-assigned this Jan 4, 2024
@tobiasdiez
Copy link
Contributor

As it has been explained before, the point of this script was to create the initial boilerplate code. I see value in creating a script that adds missing python and cython files. But that would require to parse the existing meson files instead of overwriting them. Something similar is already supported for other targets, just not for python. https://mesonbuild.com/Rewriter.html So I am sure the meson team would be happy to accept your PR.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 5, 2024

that would require

It wouldn't. Even just overwriting + then editing often has value.

@mkoeppe mkoeppe force-pushed the meson-compile--generate-meson branch from 391ab83 to fbb080b Compare January 16, 2024 07:05
@mkoeppe mkoeppe marked this pull request as ready for review January 16, 2024 07:13
@mkoeppe mkoeppe force-pushed the meson-compile--generate-meson branch from 64a0f77 to 932915a Compare February 8, 2024 18:33
@mkoeppe mkoeppe force-pushed the meson-compile--generate-meson branch from 932915a to a106e65 Compare February 14, 2024 00:37
@mkoeppe mkoeppe force-pushed the meson-compile--generate-meson branch from a106e65 to 21f4d94 Compare February 25, 2024 18:32
@mkoeppe mkoeppe force-pushed the meson-compile--generate-meson branch from 21f4d94 to 233be89 Compare March 12, 2024 02:04
@mkoeppe mkoeppe requested a review from orlitzky March 12, 2024 02:05
@orlitzky
Copy link
Contributor

With the .in files, does this now avoid overwriting handwritten meson.build? @tobiasdiez should really be the one to OK this in any case.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 12, 2024

With the .in files, does this now avoid overwriting handwritten meson.build?

Yes, the idea is to separate handwritten bits from autogenerated bits.

@mkoeppe mkoeppe requested a review from kiwifb March 14, 2024 23:46
@mkoeppe mkoeppe force-pushed the meson-compile--generate-meson branch 3 times, most recently from 3d77af1 to 8211f95 Compare March 26, 2024 02:02
@mkoeppe mkoeppe force-pushed the meson-compile--generate-meson branch from 8211f95 to a762cee Compare April 1, 2024 00:39
Copy link

github-actions bot commented Apr 1, 2024

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

@kiwifb
Copy link
Member

kiwifb commented Jun 7, 2024

I think we now have pressing needs to move to meson. This stuff looks OK, but it cannot be used in isolation. Can it even be tested without other bits for sagemath-standard?

@mkoeppe mkoeppe force-pushed the meson-compile--generate-meson branch from 2d3d5ca to b7a8263 Compare June 9, 2024 17:45
@mkoeppe mkoeppe force-pushed the meson-compile--generate-meson branch from b7a8263 to ec43bc5 Compare June 22, 2024 23:57
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 22, 2024

Can it even be tested without other bits for sagemath-standard?

Well, it generates files that can be compared with what has been committed to #36524.

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.

4 participants