#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: mkoeppe Owned by:
Priority: major Milestone: sage-9.1
Component: build: configure Keywords:
Cc: mjo, dimpase, jhpalmieri 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 mkoeppe)

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 20 months ago by mkoeppe

  • Cc mjo dimpase jhpalmieri added
  • Description modified (diff)
  • Summary changed from Move some configuration variables from src/bin/sage-env-config.in to sage_conf to 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_conf

comment:2 Changed 20 months ago by mkoeppe

  • Summary changed from 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_conf to Clean 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 20 months ago by mkoeppe

  • Branch set to u/mkoeppe/move_some_configuration_variables_from_src_bin_sage_env_config_in_to_sage_conf

comment:4 Changed 20 months ago by mjo

  • Commit set to 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 follow-up: Changed 20 months ago by mkoeppe

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

comment:6 in reply to: ↑ 5 ; follow-up: Changed 20 months ago by 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?

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

comment:7 in reply to: ↑ 6 Changed 20 months ago by mkoeppe

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 20 months ago by mjo

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

comment:9 Changed 20 months ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Status changed from new to needs_review

comment:10 Changed 20 months ago by mjo

  • Reviewers set to Michael Orlitzky
  • Status changed from needs_review to positive_review

comment:11 Changed 20 months ago by mkoeppe

Thanks!

comment:12 Changed 20 months ago by vbraun

  • Branch changed from u/mkoeppe/move_some_configuration_variables_from_src_bin_sage_env_config_in_to_sage_conf to 7364e2ab9aadd51cc57a487d8d378ba95481a14e
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.