Meta-ticket: Set environment for subprocesses invoked by Sage
Opened this issue · 17 comments
Instead of relying on running in an environment set up by sage-env, we should set up specific environment variables whenever we invoke executables. This will be configurable through sage_conf.
This is so that Sage is fully functional even when not being run from within sage-env. This continues what was done in #29038/#30563 for Maxima.
As this ticket removes some hard-coded paths depending on SAGE_LOCAL from sagelib, it will reduce the need for patching for downstream packaging.
A possible implementation strategy goes through sage.features.Executable.
This is part of:
- #21707 Meta-ticket: Split
sage-envinto 5 to clean up sage configuration
Taken care of in separate tickets:
- #32036
sage.env: Remove fallback ofSAGE_LOCALtoSAGE_VENV, remove direct uses ofSAGE_LOCALfrom the Sage library - #31296
sage.features.Executable: Prepend$SAGE_VENV/bin:$SAGE_LOCAL/bintoPATH, remove dependency ondistutils - #31275 qepcad
- #29024/#33440 singular
- #30887 4ti2
- #33465
sage.graphs: UseExecutable.absolute_filename() - #33466
lrs - #32645
cddlib - #33467
palp - #33468
gfan - #33405 Eliminate direct use of
os.getenvinsage.interfaces - #29644 gap
- environment for C compiler use at runtime (includes
ARCHFLAGS- see #31227) - #31041 environment for
sage.misc.cython
CC: @kiwifb @tobiasdiez @dimpase @antonio-rojas @orlitzky @seblabbe
Component: refactoring
Keywords: sd111
Issue created by migration from https://trac.sagemath.org/ticket/30818
Description changed:
---
+++
@@ -4,3 +4,7 @@
As this ticket removes some hard-coded paths depending on `SAGE_LOCAL` from sagelib, it will reduce the need for patching for downstream packaging.
+This is part of:
+- #21707 Meta-ticket: Split `sage-env` into 5 to clean up sage configuration
+
+Description changed:
---
+++
@@ -7,4 +7,7 @@
This is part of:
- #21707 Meta-ticket: Split `sage-env` into 5 to clean up sage configuration
+Taken care of in separate tickets:
+- #21783 QEPCAD: Location of `default.qepcadrc` and other files, get rid of qepcad bits in `src/bin/sage-location`, add `spkg-configure`
+- environment for C compiler use at runtime
Description changed:
---
+++
@@ -8,6 +8,7 @@
- #21707 Meta-ticket: Split `sage-env` into 5 to clean up sage configuration
Taken care of in separate tickets:
-- #21783 QEPCAD: Location of `default.qepcadrc` and other files, get rid of qepcad bits in `src/bin/sage-location`, add `spkg-configure`
+- #21783 qepcad
+- #29024 singular
- environment for C compiler use at runtime
Description changed:
---
+++
@@ -10,5 +10,6 @@
Taken care of in separate tickets:
- #21783 qepcad
- #29024 singular
+- #29644 gap
- environment for C compiler use at runtime
Description changed:
---
+++
@@ -11,5 +11,6 @@
- #21783 qepcad
- #29024 singular
- #29644 gap
+- #30887 4ti2
- environment for C compiler use at runtime
Hoping we can make progress on this ticket this week - https://wiki.sagemath.org/days111
Changed keywords from none to sd111
Description changed:
---
+++
@@ -13,4 +13,4 @@
- #29644 gap
- #30887 4ti2
- environment for C compiler use at runtime
-
+- environment for `sage.misc.cython`Description changed:
---
+++
@@ -13,4 +13,4 @@
- #29644 gap
- #30887 4ti2
- environment for C compiler use at runtime
-- environment for `sage.misc.cython`
+- #31041 environment for `sage.misc.cython`Description changed:
---
+++
@@ -8,7 +8,7 @@
- #21707 Meta-ticket: Split `sage-env` into 5 to clean up sage configuration
Taken care of in separate tickets:
-- #21783 qepcad
+- #31275 qepcad
- #29024 singular
- #29644 gap
- #30887 4ti2Description changed:
---
+++
@@ -3,6 +3,8 @@
This is so that Sage is fully functional even when not being run from within `sage-env`. This continues what was done in #29038/#30563 for Maxima.
As this ticket removes some hard-coded paths depending on `SAGE_LOCAL` from sagelib, it will reduce the need for patching for downstream packaging.
+
+A possible implementation strategy goes through `sage.features.Executable`.
This is part of:
- #21707 Meta-ticket: Split `sage-env` into 5 to clean up sage configurationDescription changed:
---
+++
@@ -10,6 +10,7 @@
- #21707 Meta-ticket: Split `sage-env` into 5 to clean up sage configuration
Taken care of in separate tickets:
+- #31296 `sage.features.Executable`: Prepend `$SAGE_VENV/bin:$SAGE_LOCAL/bin` to `PATH`, remove dependency on `distutils`
- #31275 qepcad
- #29024 singular
- #29644 gapDescription changed:
---
+++
@@ -15,5 +15,5 @@
- #29024 singular
- #29644 gap
- #30887 4ti2
-- environment for C compiler use at runtime
+- environment for C compiler use at runtime (includes `ARCHFLAGS` - see #31227)
- #31041 environment for `sage.misc.cython`Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review of ticket status, priority, and last modification date.
Description changed:
---
+++
@@ -10,6 +10,7 @@
- #21707 Meta-ticket: Split `sage-env` into 5 to clean up sage configuration
Taken care of in separate tickets:
+- #32036 `sage.env`: Remove fallback of `SAGE_LOCAL` to `SAGE_VENV`, remove direct uses of `SAGE_LOCAL` from the Sage library
- #31296 `sage.features.Executable`: Prepend `$SAGE_VENV/bin:$SAGE_LOCAL/bin` to `PATH`, remove dependency on `distutils`
- #31275 qepcad
- #29024 singularDescription changed:
---
+++
@@ -13,8 +13,14 @@
- #32036 `sage.env`: Remove fallback of `SAGE_LOCAL` to `SAGE_VENV`, remove direct uses of `SAGE_LOCAL` from the Sage library
- #31296 `sage.features.Executable`: Prepend `$SAGE_VENV/bin:$SAGE_LOCAL/bin` to `PATH`, remove dependency on `distutils`
- #31275 qepcad
-- #29024 singular
+- #29024/#33440 singular
+- #30887 4ti2
+- #33465 `sage.graphs`: Use `Executable.absolute_filename()`
+- #33466 `lrs`
+- #32645 `cddlib`
+- #33467 `palp`
+- #33405 Eliminate direct use of `os.getenv` in `sage.interfaces`
- #29644 gap
-- #30887 4ti2
- environment for C compiler use at runtime (includes `ARCHFLAGS` - see #31227)
- #31041 environment for `sage.misc.cython`
+Description changed:
---
+++
@@ -19,6 +19,7 @@
- #33466 `lrs`
- #32645 `cddlib`
- #33467 `palp`
+- #33468 `gfan`
- #33405 Eliminate direct use of `os.getenv` in `sage.interfaces`
- #29644 gap
- environment for C compiler use at runtime (includes `ARCHFLAGS` - see #31227)