On Wednesday, September 10, 2025 at 12:17:27 PM UTC+8 Kwankyu Lee wrote:
We really should just remove all those SAGE_xyz variables. Why? Do you assume that sage-the-distro is dead? I do think it's close to dead, but that's not the point. The reason why SAGE_xyz should not be used is because they mostly encode false and outdated assumptions. To give a few examples: SAGE_SRC: There is no source folder after you installed; in particular you should be able to delete the source folder later without breaking anything SAGE_ROOT: Same. SAGE_PKGS: Doesn't even make sense outside of sage-the-distro. SAGE_VENV: Should always be the currently activated venv and it's better to use importlib to find stuff there SAGE_SHARE: Also doesn't make sense outside of sage-the-distro. Instead of looking for stuff there at runtime, you should try to find your resources at build time. Say on arch, I'm installing the sagemath-doc package which puts it in usr/share/doc/sage. How do you communicate that to sagemath? I don't know. Define SAGE_DOC to the non-default location? Anyway, this is not a new problem. That's my point. There is universally correct "default location", not even within sage-the-distro, so you have to set SAGE_DOC after you build the docs to tell sagelib where they are installed. In Gentoo we want stuff in /usr/share/doc/pkg-name-pkg-version and I have been managing that properly so far, and I certainly want a mechanism to do it in the future meson setup build meson compile -C build doc-html cp -r build/src/doc/html usr/share/doc/sage-$VERSION As for example done on arch: https://github.com/gripped/archpkgbuilds/blob/master/extra/sagemath-doc/PKGBUILD How do you currently set SAGE_DOC at runtime in Gentoo? -- 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 sage-devel+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/sage-devel/81350b61-9f8b-4658-8fb2-e43542cb93fcn%40googlegroups.com.