-
-
Notifications
You must be signed in to change notification settings - Fork 504
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
Use meson in sage-the-distro #39030
base: develop
Are you sure you want to change the base?
Use meson in sage-the-distro #39030
Conversation
Sure, I'm ready to help as much as I can. Could you share an outline of how this is meant to work? I imagine it is an adaptation to the Sage's venv (which is a more or less standard venv, no?) of what one can get e.g. with a standard venv on Gentoo Linux, or another environment where all the dependencies are available. Would this approach also work for a Conda-based environment? |
As a first step, I would not change how sage-the-distro works. So leave all the dependency installation (python and non-python deps) untouched for now. (We can discuss later how to transfer the configure checks to meson, and perhaps even completely replace the install scripts by mesons wrap files) So, basically the only required change would be |
running
|
that's cause
|
I think these requirements files can be safely deleted. At least I'm not aware of any usage of them. |
these are for building all these sagemath-* pseudo-packages. By the way, can you resolve the git conflict? |
You are right, these are actually used. Does ae33069 works for you? (I cannot test it atm on linux) |
that's from our basement here, in fact. The thing on the right leaked, and took 5 days and $12K to fix. |
Doesn't seem to be any different from
I'm attaching the new config.log, doesn't seem to make a difference. |
cf2be9d
to
f316fb3
Compare
looks like my rebase didn't fly. I'll do a merge and post update |
4ddfb71
to
72f62eb
Compare
This test fails - but actually I don't know its purpose:
with the current fix - adding SAGE_SRC to the list of directories to search for Cython headers (see the change in SAGE_SRC isn't quite right in some cases, e.g. for a setup where Sage is installed from a package manager. In particular, 5ee730d was added by @tornaria - for the purpose I don't understand |
targets |
The difference comes from the fact that cython doesn't fully work with PEP 420 implicit namespace packages (essentially the test is recording this fact). However, when we use meson to build sagelib, then Can we guard the test be the absence of |
Some quick comments:
|
meson is meant to become the only system to build sagelib, as far as I am concerned. Transition is not straightforward, though. |
@tornaria - my question was: how do you set paths to sagelib Cython header files on Void, say. I imagine you keep a full source directory somewhere (to provide the Cython functionality and the docs), but where? How can it be customised? I am talking about cythonising at Sage prompt, not the package building |
I don't think this is easily doable in our current doctest framework. Unless, perhaps, pytest gets used. |
Why keep this test at all? """
In Cython 0.29.33 using `from PACKAGE cimport MODULE` is broken
when `PACKAGE` is a namespace package, see :issue:`35322`::
sage: cython('''
....: from sage.misc cimport cachefunc
....: ''')
Traceback (most recent call last):
...
RuntimeError: Error compiling Cython file:
...
...: 'sage/misc.pxd' not found
""" If the test fails, then it's no longer broken: great! Meson solved the problem. |
I'm far from an expert on this. For the pxd files, things usually just work if they're installed next to the pyx files? For the |
Sage's |
OK, "plonk" it goes then. e1167ee |
I think that there are two related problems here. The first is the pxd files, which are needed to
should be looking for The other issue is the |
in my book they are basically abandonware. |
Well, meson generates the necessary |
nothing to do with sage.schemes
This is now #39139 |
This needs more work on macOS, where different C++ interfaces need different options, e.g. linbox needs This probably explains why macOS CI fails here. |
<!-- ^ 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". --> As proposed in sagemath#39030 (comment). Namespace support is still not there for all tools (cython, pytest, ...), so it's a good idea to still distribute these `__init__.py` files for now until the ecosystem catches up. Also fixes failures of the meson workflow due to a missing python file. ### 📝 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#39140 URL: sagemath#39139 Reported by: Tobias Diez Reviewer(s): Dima Pasechnik
<!-- ^ 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". --> As proposed in sagemath#39030 (comment). Namespace support is still not there for all tools (cython, pytest, ...), so it's a good idea to still distribute these `__init__.py` files for now until the ecosystem catches up. Also fixes failures of the meson workflow due to a missing python file. ### 📝 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#39140 URL: sagemath#39139 Reported by: Tobias Diez Reviewer(s): Dima Pasechnik
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.
Definitely shouldn't be merged in this release cycle. I'm happy to discuss the timeline and prerequisites of fully migrating from setuptools to meson.
📝 Checklist
⌛ Dependencies