Changes between Version 2 and Version 28 of Ticket #29022


Ignore:
Timestamp:
Jan 17, 2020, 5:22:02 PM (3 years ago)
Author:
Matthias Köppe
Comment:

I've expanded on the explanation of the goals of this ticket.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29022

    • Property Status changed from new to needs_info
    • Property Authors changed from to Matthias Koeppe
    • Property Cc Jeroen Demeyer Dima Pasechnik added
    • Property Summary changed from Create module src/sage/env_config.py from src/sage/env_config.py.in, defining variables for use in sage.env to Make sagelib installation directory more flexible by creating a module src/sage/env_config.py from src/sage/env_config.py.in, defining variables for use in sage.env
    • Property Branch changed from to u/mkoeppe/create_module_src_sage_env_config_py_from_src_sage_env_config_py_in__defining_variables_for_use_in_sage_env
    • Property Commit changed from to bba08ec0c8008f925643eaf56742115d83253e23
  • Ticket #29022 – Description

    v2 v28  
    1 This is a step toward #25486: "`$SAGE_LOCAL/bin/sage` should work in an environment without `SAGE_*` variables; and also useful for #29013.
     1This ticket makes sagelib more independent from the environment variables set by `src/bin/sage-env` (`local/bin/sage-env`), and to remove assumptions regarding install locations of sagelib relative to `$SAGE_LOCAL`.
    22
    3 In a first step, we just set `SAGE_LOCAL`, but later packages' `spkg-configure` might be setting `MATHJAX_DIR` etc.
     3- To support users who want to install an experimental version of sagelib in other install locations, such as in a user site packages directory.
     4- For making sagelib available in a user's venv, as in the following example:
     5   Without this ticket:
     6   {{{
     7   $ sage -python -m venv --system-site-packages ~/personal-sage-venv/
     8   >>> import sage.env
     9   >>> sage.env.SAGE_LOCAL
     10   '/Users/mkoeppe/personal-sage-venv'                                     # wrong
     11   >>> import sage.all
     12   RuntimeError: You must get the file local/bin/sage-maxima.lisp
     13   }}}
     14   With this ticket:
     15   {{{
     16   >>> sage.env.SAGE_LOCAL
     17   '/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local'
     18   >>> import sage.all
     19   >>>
     20   }}}
     21- To support #29013/#27824: spkg-configure.m4 for python3
     22- To make it possible for distributions to use a stock `src/sage/env.py` (providing a custom `src/sage/env_conf.py`).
    423
    5 The hope is that distributions would be able to use a stock `src/sage/env.py` and a custom `src/sage/env_conf.py`.
     24In a first step, we just set `SAGE_LOCAL`, but also `SAGE_ROOT` could be added (for developer conveniences such as sage.misc.edit_module); and later packages' `spkg-configure` might be setting `MATHJAX_DIR` etc.
    625
    726In a follow-up ticket, `src/sage/env_config.py` would actually be generated by `src/setup.py`, not `configure`.