Opened 3 years ago

Closed 3 years ago

#29384 closed enhancement (fixed)

Clean up src/bin/sage-env-config.in: Move logic to src/bin/sage-env, move non-environment configuration variables to sage_conf.py

Reported by: Matthias Köppe Owned by:
Priority: major Milestone: sage-9.1
Component: build: configure Keywords:
Cc: Michael Orlitzky, Dima Pasechnik, John Palmieri Merged in:
Authors: Matthias Koeppe Reviewers: Michael Orlitzky
Report Upstream: N/A Work issues:
Branch: 7364e2a (Commits, GitHub, GitLab) Commit: 7364e2ab9aadd51cc57a487d8d378ba95481a14e
Dependencies: Stopgaps:

Status badges

Description (last modified by Matthias Köppe)

Follow-up from #29038.

We clean up sage-env-config, intended for setting direct values only, by moving conditional settings of other environment variables to sage-env instead.

Moreover, we move configuration variables that are only needed by the Sage python process but not as environment variables by its child processes, to sage_conf.py. In this way they become available in the sage.all module even when invoked outside of a sage-env.

(part of #21707.)

Change History (12)

comment:1 Changed 3 years ago by Matthias Köppe

Cc: Michael Orlitzky Dima Pasechnik John Palmieri added
Description: modified (diff)
Summary: Move some configuration variables from src/bin/sage-env-config.in to sage_confClean up src/bin/sage-env-config.in: Move logic to src/bin/sage-env, move configuration variables not needed as env variables from to sage_conf

comment:2 Changed 3 years ago by Matthias Köppe

Summary: Clean up src/bin/sage-env-config.in: Move logic to src/bin/sage-env, move configuration variables not needed as env variables from to sage_confClean up src/bin/sage-env-config.in: Move logic to src/bin/sage-env, move non-environment configuration variables to sage_conf.py

comment:3 Changed 3 years ago by Matthias Köppe

Branch: u/mkoeppe/move_some_configuration_variables_from_src_bin_sage_env_config_in_to_sage_conf

comment:4 Changed 3 years ago by Michael Orlitzky

Commit: 7364e2ab9aadd51cc57a487d8d378ba95481a14e

Do we still need

var('SAGE_NAUTY_BINS_PREFIX',        '')

in src/sage/env.py after this?


New commits:

7364e2aClean up src/bin/sage-env-config.in: Move logic to src/bin/sage-env, move non-environment configuration variables to sage_conf.py

comment:5 Changed 3 years ago by Matthias Köppe

Yes, this is what makes the variable available in the module sage.env.

comment:6 in reply to:  5 ; Changed 3 years ago by Michael Orlitzky

Replying to mkoeppe:

Yes, this is what makes the variable available in the module sage.env.

Oh, I see. Updated question: is there any reason to be going through sage.env still, as opposed to importing the value directly from sage_conf? Something to do with distro packaging?

(I've probably asked this same question three times by now, sorry.)

comment:7 in reply to:  6 Changed 3 years ago by Matthias Köppe

Replying to mjo:

Replying to mkoeppe:

Yes, this is what makes the variable available in the module sage.env.

Oh, I see. Updated question: is there any reason to be going through sage.env still, as opposed to importing the value directly from sage_conf? Something to do with distro packaging?

Well, sage_conf is still "optional". It's yet to be seen what distribution packagers will be doing with it. For now it's best to keep the logic of handling the situation when sage_conf does not exist centrally, rather than in every place that needs a variable.

comment:8 Changed 3 years ago by Michael Orlitzky

Ok, my curiosity is satisfied. Needs review, or still working on it?

comment:9 Changed 3 years ago by Matthias Köppe

Authors: Matthias Koeppe
Status: newneeds_review

comment:10 Changed 3 years ago by Michael Orlitzky

Reviewers: Michael Orlitzky
Status: needs_reviewpositive_review

comment:11 Changed 3 years ago by Matthias Köppe

Thanks!

comment:12 Changed 3 years ago by Volker Braun

Branch: u/mkoeppe/move_some_configuration_variables_from_src_bin_sage_env_config_in_to_sage_conf7364e2ab9aadd51cc57a487d8d378ba95481a14e
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.