Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #29852: sage: Determine SAGE_LOCAL, SAGE_ROOT via sage-config if…
… it exists We reduce the runtime dependency of `sage` on `sage-env-config`. We query `sage-config` (installed by `sage_conf`, which has a dependency on our `python3` package) for the values of `SAGE_LOCAL` and `SAGE_ROOT`. `sage-config` must be in the same directory as $0. This allows the installed `sage` script to be invoked directly from `$SAGE_LOCAL/bin` in an environment without `SAGE_...` variables, restoring what was previously implemented in #25486. Also, we move sourcing of `sage-env-config` (but not `sage-env`!) earlier in the `sage` script. This is so that commands such as `$SAGE_LOCAL/bin/sage --root` work correctly. Follow-up tickets: - #30888 resolve symlinks so it even works for symlinks to `$SAGE_LOCAL/bin/sage` - #30013 set `SAGE_VENV` too - remove the build-time dependency of the sage distribution on `src/bin /sage-env-config` URL: https://trac.sagemath.org/29852 Reported by: mkoeppe Ticket author(s): Matthias Koeppe Reviewer(s): Dima Pasechnik, François Bissey
- Loading branch information