On 2025-10-18 14:26:34, Oscar Benjamin wrote:
> The meson-python editable setup that it sounds like sagemath now uses
> is available as `spin install` but I don't use that because I prefer
> running spin commands to trigger a rebuild explicitly.
We switched to editable installs a long time ago (way before meson)
because people kept starting sage without running "sage -b", and then
were confused that their changes didn't take effect. If you're willing
to forego that ability, a non-editable sage build already works this
way.
The meson commands take a few days to get used to, but they're much
more flexible than the spin counterparts. There are thousands of
projects that use meson, and only a few that use spin. If you're going
to learn a new set of commands either way, why not learn the more
useful set?
A non-editable workflow[0] is basically...
$ meson setup --prefix="${HOME}/.local" build
$ meson install -C build
<do whatever>
$ meson install -C build
This does incremental builds, only when you ask for them, and then
installs the result to your user's PYTHONPATH so that no magic
commands are needed. To use it, you just run `python` or `ipython`.
Knowledge completely transferrable. You don't even need pip!
[0] Sage overrides one of the defaults, so you also need to pass
--python.install-env=prefix when configuring sage. But any other
meson-python project should work this way out-of-the-box. Also
note that "build" needs to be changed for sage due to the distro
files living there.
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/sage-devel/aPOgK1dl9CALJ99N%40mertle.