Skip to content

sage.env: Give values from sage_conf precedence over environment variables #34236

@mkoeppe

Description

@mkoeppe

This change will make installations of Sage more robust.

Currently,

    /SAGE_ROOT_A/sage -sh -c '/SAGE_ROOT_B/venv/bin/python3 -c "import sage.env; print(sage.env.SAGE_ROOT)"'

will give SAGE_ROOT_A (bad), whereas

    /SAGE_ROOT_A/sage -sh -c '/SAGE_ROOT_B/venv/bin/sage -c "import sage.env; print(sage.env.SAGE_ROOT)"'

will give SAGE_ROOT_B (good).

Similarly to

CC: @jhpalmieri @kiwifb

Component: refactoring

Branch/Commit: u/mkoeppe/sage_env__give_values_from_sage_conf_precedence_over_environment_variables @ 4d20b92

Issue created by migration from https://trac.sagemath.org/ticket/34236

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions