You can try the verbose mode by setting the env variable `MESONPY_EDITABLE_VERBOSE`, see https://mesonbuild.com/meson-python/how-to-guides/editable-installs.html#verbose-modeAd 1: it's the documentation build. This should be fixed by https://github.com/sagemath/sage/pull/41156 and https://github.com/sagemath/sage/pull/41162 but I currently don't have much time to work on this myself. So help eg in the form of PRs against the PR-branch is very welcome.
On Wednesday, February 4, 2026 at 3:09:10 PM UTC+1 tcsc...@gmail.com wrote:It just does this:tscrim@travis-apricot:~$ sage
Traceback (most recent call last):
File "/home/tscrim/sage/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/_sagemath_editable_loader.py", line 345, in _rebuild
subprocess.run(self._build_cmd, cwd=self._build_path, env=env, stdout=subprocess.DEVNULL, check=True)
File "/home/tscrim/sage/local/var/lib/sage/venv-python3.12.5/lib/python3.12/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/ninja']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/tscrim/sage/src/bin/sage-ipython", line 9, in <module>
from sage.misc.banner import banner
File "/home/tscrim/sage/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/_sagemath_editable_loader.py", line 311, in find_spec
tree = self._rebuild()
^^^^^^^^^^^^^^^
File "/home/tscrim/sage/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/_sagemath_editable_loader.py", line 347, in _rebuild
raise ImportError(f're-building the {self._name} meson-python editable wheel package failed') from exc
ImportError: re-building the sagemath meson-python editable wheel package failedThus I cannot debug Cython errors unless I run "sage -b", which takes forever because the meson setup takes multiple minutes every time.Two things we (specifically the people changing stuff in the build system) **really** need to do because this is unsustainable for Cython development in Sage:1) Figure out what makes meson take so long to do its thing each time "sage -b" is run because this significantly slows many things down.2a) Display the error message when cython builds fail so we can debug cython errors with the magic compiling. (I still *very* strongly believe we should give a message saying Cython code is recompiling verbosely on the files so it doesn't look like it is hanging. I also believe it is bad practice to make a non-jit-compiled language act like a jit-compiled language, but that is secondary.)
2b) Revert "sage -b" to actually just rebuilding the parts of Sage that should be rebuilt/recompiled; meson is not part of this AFAIK.
Travis
Also, I just got bit by the hidden magic cython recompiling everything (and I don't know what I did to cause it either). Thankfully my computer is powerful and fast, it only took 10 minutes to do whatever it needed to do (which I don't know because I didn't enable the meson verbose on this computer).Python files are okay since they are basically instantaneous, but Cython files are a different beast. IMO the proper thing to do would be to revert this feature (to what is effectively the status quo) and **first** have a proper discussion about whether we want it or not.
[...] I would recommend a full rebuild of sagemath after updating any dependencies.
The problem there at the moment for me is that it punts to "conda" documentation for how to get conda set up -- and conda seems very insistent on messing with my ".bashrc". I don't want that!
I think the problem is in "conda init". That sets it up so that you can use "conda activate" in a shell and then can continue using that activated environment in the original shell. For that, the "conda" command must run as a function in the shell, not as an executable called from the shell (because one cannot scribble in the environment of the parent process -- at least not without horrible hackery).I was not able to use miniforge without allowing it to do a "conda init". That's the part I don't like because it makes me expect that also other users who want to use the conda install of sage "the conda way" will have to have their ".bashrc" changed and I don't think that's a reasonable thing to ask just for people to run sage.
There is obviously a solution: have something like "conda-shell" which starts a *subshell* with the conda initialization inserted and/or an environment activated. We know which file conda wants "dot-loaded" into the shell, so that's the one to dot-load for the subshell initialization.That's basically what "sage -sh" does. I do not know if that exists already. If it does then I think my complaint is that the sage documentation doesn't point to it.It may also be that the "sage" script itself already sets up a strong enough environment that, once installed, conda-sage doesn't actually need conda activation in order to run properly (my limited tests point in that direction). In that case it would still be good if there were a "conda-shell" to install conda-sage with, so that one doesn't need to worry about "conda init" and sanitizing one's ".bashrc" afterwards.
Note that if you use conda then there is no need for sage-the-distro (and thus, in particular, for the sage shell env init). In particular, if you install sage via conda (conda create -n sage sage) then you only have a "sage" script/cli available if you first activate the conda env (conda activate sage). We could add to the documentation instructions on how to setup a custom subshell that automatically activates the sage conda env. I like that idea. Without trying, a bash script with ` #!/usr/bin/env conda run -n sage sage` should do the job.