19 | | See also, for a broader context, |
20 | | - #21707 Task: Split sage-env into 5 |
| 17 | The module and the script are used as follows: |
| 18 | |
| 19 | 1. It provides configuration information to sagelib at installation time (`src/setup.py`). |
| 20 | |
| 21 | 2. It provides configuration information to the docbuild, in particular about the install locations of documentation of external packages. |
| 22 | |
| 23 | 3. It provides configuration information to the runtime of sagelib, making sagelib more independent from the environment variables set by `src/bin/sage-env` (`local/bin/sage-env`). |
| 24 | |
| 25 | a. By providing SAGE_LOCAL as one the configuration variables, it removes assumptions regarding install locations of sagelib relative to $SAGE_LOCAL. This enables the following: |
| 26 | - Installing an experimental version of sagelib in other install locations, such as in a user site packages directory. |
| 27 | - Making sagelib available in a user's venv, as in the following example: |
| 28 | Without this ticket: |
| 29 | {{{ |
| 30 | $ sage -python -m venv --system-site-packages ~/personal-sage-venv/ |
| 31 | $ source ~/personal-sage-venv/bin/activate |
| 32 | (personal-sage-venv) $ python |
| 33 | >>> import sage.env |
| 34 | >>> sage.env.SAGE_LOCAL |
| 35 | '/Users/mkoeppe/personal-sage-venv' # wrong |
| 36 | >>> import sage.all |
| 37 | RuntimeError: You must get the file local/bin/sage-maxima.lisp |
| 38 | }}} |
| 39 | With this ticket: |
| 40 | {{{ |
| 41 | >>> sage.env.SAGE_LOCAL |
| 42 | '/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local' |
| 43 | >>> import sage.all |
| 44 | >>> sage.all.maxima('1') |
| 45 | 1 |
| 46 | }}} |
| 47 | - #29013/#27824: Using the system python3 via spkg-configure.m4 |
| 48 | b. For a broader context: see #21707 Task: Split sage-env into 5 |