-
-
Notifications
You must be signed in to change notification settings - Fork 666
fix SAGE_DOC variables #40798
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
fix SAGE_DOC variables #40798
Conversation
The solution should be making meson install the doc into the "old" default location, not changing the default location to where meson installs the doc. I think that changing the "old" default location is an "API change". |
it's not an API change: the user doesn't need to worry about the value of |
Completely agree. This change is sage-the-distro-centric and breaks the default setting for distro packaging. Nothing in sagelib should reference or depend on any sage-the-distro specific paths. |
@antonio-rojas how do you make the |
I don't have to do anything special. Ideally meson would provide an |
I agree. The expected location is provided by SAGE_DOC environment variable while sage-the-distro sets SAGE_DOC (via SAGE_SHARE) to its default locations. |
is SAGE_DOC considered part of sagelib? (I don't consider it this way). I would say that the content of From my point of view this PR is a hotfix for |
As long as sagelib uses it (as it currently does in
A hotfix for one use case should not break other use cases (and even CI) |
I hear conflicting views on whether Before we converge on a solution, we need to set up the rules on what the acceptable solution is. As we have it now,
sorry, this PR has broken an unwritten, non-official, rule that SAGE_DOC is a particular function of SAGE_SHARE, that's all it broke, isn't it? As long as we don't have a coherent policy describing where the border between sagelib and sage the distro is, we are bound to have these kinds of SNAFUs. |
There is a package in sage-the-distro called literally
It broke the sane fallback that was set in Anyway: if you want a quick and dirty fix, then just add the new fallback path to |
@@ -231,7 +231,7 @@ if [ -n "$SAGE_LOCAL" ]; then | |||
export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed" # deprecated | |||
fi | |||
if [ -n "$SAGE_SHARE" ]; then | |||
export SAGE_DOC="$SAGE_SHARE/doc/sage" | |||
export SAGE_DOC="$SAGE_ROOT/build/sage-distro/src/doc" | |||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to check for SAGE_SHARE
being defined anymore.
AFAIK, anything which an external build tool will set/supply, such as Can we prepare a list to put there? So far, only |
It's not really set as an env variable but embedded into Line 13 in 2b55acf
which usually results into SAGE_SHARE = "/usr/share" (using the built-in datadir option of meson) and thus SAGE_DOC = "/usr/share/doc/sage" (via the default in sage.env).
So that also explains why it's currently working for Arch and other Linux distros that install the docs in the standard way (thanks @antonio-rojas for the explanation) |
how is this done for the sagelib's |
Then for sage-the-distro (or for those who are not a root user), |
If you specific the version as dynamic, then meson-python uses the version specified in the meson.build file (which is read from
Not sure I quite understand the question. It also works without any problem for non-root installs. For example, in the
probably a similar path in a venv (although I don't have one lying around to test it). Of course, SAGE_DOC will also not work in these situations because the docs are not installed there... |
As far as I understand, in sage-the-distro, Hence meson may use |
I'm sorry, but I cannot say anything intelligent about this - I never was able to understand (It would probably worth moving sage-the-distro stuff from |
#40807 solves the problem along that line. Now needs review. |
closing this in favour of #40807 |
Thanks. |
after switch to meson doc-build, SAGE_DOC points to a wrong location,
as reported on sage-devel. We fix it here
📝 Checklist
⌛ Dependencies