Changes between Version 3 and Version 28 of Ticket #21707


Ignore:
Timestamp:
01/19/20 17:12:56 (23 months ago)
Author:
mkoeppe
Comment:

Hoping for input from people involved in packaging.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #21707

    • Property Status changed from new to needs_info
    • Property Authors changed from to Matthias Koeppe
    • Property Cc dimpase isuruf arojas infinity0 gh-timokau added
    • Property Summary changed from Split sage-env into sage-build-env and sage-env to Split sage-env into 5
    • Property Dependencies changed from to #29038
    • Property Milestone changed from sage-7.5 to sage-9.1
    • Property Type changed from enhancement to task
  • Ticket #21707 – Description

    v3 v28  
    1 `sage-env` is used by both Sage-the-distribution while building packages,
    2 and by Sage at runtime.
     1`src/bin/sage-env` (with generated configuration in `src/bin/sage-env-config`; installed in `$SAGE_LOCAL/bin`) is used in all of the following contexts:
     21. Sage-the-distribution while building spkgs,
     32. Sage-the-distribution for building sagelib,
     43. for environment variables needed to start Sage,
     54. as variables by Sage at runtime (through `sage.env`), and
     65. for environment variables affecting subprocesses of Python invoked by sagelib modules.
    37
    4 It should be split into two or three separate scripts.
    5  - `sage-build-env` is for the '''build-time environment variables for sage-the-distribution''', should go into `build/bin` and not be installed. Or perhaps more stuff should be put into `build/make/install`
    6  - `sagelib-build-env` is for the '''build-time environment variables for sagelib'''
    7  - `sage-env` is for the '''run-time environment variables of sage''' and should be installed by `src/setup.py` (thus very late in the build process), rather than by `build/make/Makefile`. (`sage-env` will be very short and at some point hopefully disappear, if we want sagelib to become a standalone Python library - #21507)
     8This ticket proposes to split the configuration according to these 5 contexts. This will make the installation of Sage more modular and flexible.
    89
    9 This is a step towards the cleaning of `src/bin` as described in #21569, #21570, #21559.
     101./2. Create `build/bin/sage-build-env`(with generated configuration in `build/bin/sage-build-env-config`) for the build-time environment variables for sage-the-distribution (spkg and sagelib). It is not installed in $SAGE_LOCAL.
     11  a. Initially, `build/bin/sage-env` will call `src/bin/sage-env`.
     12  b. In `build/make/deps`, call `build/bin/sage-build-env` instead of `src/bin/sage-env`.
     13  c. Gradually, we will move settings from `src/bin/sage-env[-config]` to `build/bin/sage-build-env[-config]` that are known to be only needed for 1. (Note that not all compiler-related environment variables can be moved exclusively to 1 – some need to be added to 5 as well for some some calls to compilers needed at runtime to support things like `%cython` (?) and `sage.calculus.desolvers.desolve_mintides`.)
     14  d. Eventually, we will remove the call to `src/bin/sage-env`.
     15
     162./3. Obtain sagelib's build-time configuration such as `src/setup.py`'s `library_dirs` and runtime information (`sage.env`) from `sage-config` (introduced in #29038).
     17  a. In `src/Makefile`, poison the `SAGE_LOCAL` variable.
     18  b. Pass `SAGE_PKGS` (if still needed at all - see #28815) via `sage-config` instead of from `src/Makefile`.
     19
     203./4./5. Using `sage_conf` (Python module and script `sage-config`, #29038), make `sage.all` fully functional when imported from a Python, without setting any environment variables (`sage-env`).
     21a. Initially, phase out `src/bin/sage-env-config` by using `sage-config` instead.
     22b. Set `sage.env` variables via the Python module `sage_conf` instead of relying on information from environment variables. Example: `CYSIGNALS_CRASH_DAYS`
     23c. Set environment variables that are needed only by subprocesses invoked by sagelib in the environment of these subprocesses, rather than relying on them begin set in `sage-env`. This environment could be provided by a variable `sage_conf.SAGE_SUBPROCESS_ENV` and/or more invidual variables. Example: `R_PROFILE`
     24d. Finally, remove use of `sage-env` for all purposes except for `sage -sh`.
     25
     26Related:
     27- cleaning of `src/bin` as described in #21569, #21570, #21559.
     28- sagelib as a standalone Python library - #21507)