Changes between Version 10 and Version 11 of Ticket #29038


Ignore:
Timestamp:
01/19/20 17:39:32 (21 months ago)
Author:
mkoeppe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29038 – Description

    v10 v11  
    1 This ticket introduces a new Python package `sage_conf` that solves the problem of providing configuration information to sagelib at installation time (`src/setup.py`), including the docbuild, and to the runtime of sagelib.
     1This ticket introduces a new Python package `sage_conf`.
    22
    33- sage-the-distribution will generate this Python package at `./configure` time and install it at build time before starting to build/install sagelib using `src/setup.py`.
    44- Distributions will generate and install their own `sage_conf` by a method of their choice before starting to build/install sagelib.
    5 
    6 (This ticket provides an alternative implementation of #29022 - see there for additional motivation.)
    75
    86A `console_script` allows to query individual variable values from the shell, or output all variables in .env format:
     
    1715}}}
    1816
    19 See also, for a broader context,
    20 - #21707 Task: Split sage-env into 5
     17The module and the script are used as follows:
     18
     191. It provides configuration information to sagelib at installation time (`src/setup.py`).
     20
     212. It provides configuration information to the docbuild, in particular about the install locations of documentation of external packages.
     22
     233. 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
     25a. 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
     48b. For a broader context: see #21707 Task: Split sage-env into 5