-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
Compile everything with meson #36524
Conversation
Note that the |
I don't see how this is relevant here. I'm trying to build the full sagelib with meson. Just started with a small part to make reviewing easier |
Just a heads up that the monolithic build is going to go away very soon. So it would be unwise to design a new system for the monolithic library. |
…nto meson-compile
… into meson-compile
<!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> Add meson configuration to compile sagelib with meson. Basic developer docs are added as well (meant as background info, not real installation instructions and thus under "developer"). ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] 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 <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36524 Reported by: Tobias Diez Reviewer(s): Dima Pasechnik, Gonzalo Tornaría, Matthias Köppe, Michael Orlitzky, Tobias Diez
Testing this in 10.5.beta8, I get a compile error:
The usual |
optional packages aren't done yet. in a follow-up. |
Ahother issue: there is a duplicate
|
well, the build system tries to build them anyway |
I haven't seen this. How did you do the meson build? |
again, it's not clear without more details how to reproduce this. I tested by creating a standard venv (no isolation) and ran pip install there. Then |
|
well, that's a different toolchain. It should work, though, too. Open an issue? |
an advantage of meson build as tested is on the fly rebuild of changed pieces, cython too. Wheel building is different, we should test and fix it. |
There's a regression where installed |
Sorry only saw this now. Cleaning up the git history would have been nice indeed. I guess its too late now :( |
Fix a regression from sagemath#36524 where `sage -t` skips doctesting installed `rst` files (which get installed as `rst.txt`) URL: sagemath#38863 Reported by: Antonio Rojas Reviewer(s): Tobias Diez
@tobiasdiez it seems that --- a/Makefile
+++ b/Makefile
@@ -122,7 +122,9 @@ sagelib-clean:
rm -rf c_lib .cython_version cython_debug; \
rm -rf build; find . -name '*.pyc' -o -name "*.so" | xargs rm -f; \
rm -f $$(find . -name "*.pyx" | sed 's/\(.*\)[.]pyx$$/\1.c \1.cpp/'); \
- rm -rf sage/ext/interpreters) \
+ rm -f sage/ext/interpreters/interp_*.c ; \
+ rm -f sage/ext/interpreters/wrapper_*.p* ; \
+ rm -f sage/ext/interpreters/all.py ) \
&& (cd "$(SAGE_ROOT)/build/pkgs/sagelib/src/" && rm -rf build); \
fi
|
Meanwhile can the README also be updated to include instruction how to build with meson, [edit: looks like it's at https://doc-release--sagemath.netlify.app/html/en/installation/meson . Just not released yet] and SageMath developer guide updated on how to modify meson.build for each file added? At the moment it can be somewhat unclear… |
What exactly are you missing? Would it be enough to say that new python files should be added to the meson.build in the same folder? |
Sounds about right, but actually since people may just not read the documentation, why can't we just glob the folder for all (And meanwhile why is the determination of compiling with C versus C++ implicit in Makefile and need to be specifically specified in meson?) |
that's because meson does not support getting this info from special comments in .pyx files. |
Specifying source files by glob-patterns is just not supported by meson, and for good reasons: https://mesonbuild.com/FAQ.html#why-cant-i-specify-target-files-with-a-wildcard |
Makes sense. For my purpose (developer accidentally forget to include file in meson build file and get puzzled over error) I think it would be a good thing (if it can be implemented) to somehow only check that there's no file on disk that is not listed in meson.build in e.g. a full build, or on the CI. Then the performance concerns are not a problem. |
Now that I've had more time to spend on it, I'm using
so that the result is installed to my default To run the sage repl I have a script (called #!/bin/sh
# This is the default when the variable is unset (or empty), but the
# "sage" script will clobber it in that case, so we have to explicitly
# set it to the default value.
export PYTHONUSERBASE="${HOME}/.local"
# Needed to find the sage-on-gentoo database packages.
export SAGE_SHARE="/usr/share/sage"
exec "${HOME}/src/sage.git/sage" "${@}" The last line just points to the usual "sage" script, until I find a better way to do that. And the |
Is it intentional that this only installs the python library, and not any of the executable scripts? (sorry if this has been addressed before, I only skimmed through the 200+ posts) |
Add meson configuration to compile sagelib with meson. Basic developer docs are added as well (meant as background info, not real installation instructions and thus under "developer").
📝 Checklist
⌛ Dependencies