You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gh-40894: Remove usage of `SAGE_SHARE` from sagelib
The `SAGE_SHARE` variable is still used in sagelib to manage some data
files. This is problematic for a few reasons:
- `SAGE_SHARE` can only store a single path, but data can be installed
in multiple different paths (eg. system vs user paths)
- Some methods try to write there, which is not possible if the path is
not writeable (as it is the case on distro packages, where `SAGE_SHARE`
generally points to `/usr/share`)
We replace all uses in sagelib with more appropriate solutions. For
locating data files, we use `sage_data_paths`, which on Linux includes
in particular `XDG_DATA_DIRS`. When writing files we always use a user
path under `DOT_SAGE`, which is the only one we can assume to be
writeable.
`SAGE_SHARE` is still used as a fallback value for `sage_data_paths`, so
this should be backwards compatible.
URL: #40894
Reported by: Antonio Rojas
Reviewer(s): Antonio Rojas, Tobias Diez
0 commit comments