Opened 2 years ago

Closed 20 months ago

#29951 closed enhancement (fixed)

src/bin/sage-env: Make SAGE_ROOT and SAGE_LOCAL optional

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-9.3
Component: scripts Keywords:
Cc: fbissey, mjo, arojas, isuruf, thansen, jhpalmieri, gh-jamesjer Merged in:
Authors: Matthias Koeppe Reviewers: Dima Pasechnik, Jerry James
Report Upstream: N/A Work issues:
Branch: c8e6910 (Commits, GitHub, GitLab) Commit: c8e69100d6b4ba30a3854266fbaa83aa3982f4a3
Dependencies: Stopgaps:

Status badges

Description (last modified by mkoeppe)

We make SAGE_ROOT and SAGE_LOCAL optional. If one is unset, we skip setting the various environment variables that depend on it.

This change hopefully simplifies distribution packaging, with the goal of allowing unmodified scripts src/bin/sage and src/bin/sage-env to be shipped.

See also:

  • #30013 src/bin/sage-env: Make sure SAGE_SCRIPTS_DIR is at the beginning of the PATH
  • #29850 Install sage-env-config as part of sage_conf; make sage-env-config optional
  • Meta-ticket #21707: Split sage-env into 5 to clean up sage configuration

Change History (26)

comment:1 Changed 2 years ago by mkoeppe

  • Dependencies set to #25486

comment:2 Changed 2 years ago by mkoeppe

  • Description modified (diff)

comment:3 Changed 2 years ago by mkoeppe

  • Cc mjo added

comment:4 Changed 2 years ago by mkoeppe

  • Dependencies changed from #25486 to #30128

comment:5 Changed 23 months ago by mkoeppe

  • Dependencies #30128 deleted

comment:6 Changed 23 months ago by mkoeppe

  • Description modified (diff)
  • Summary changed from src/bin/sage-env: Make sage-env-config and SAGE_LOCAL optional to src/bin/sage-env: Make SAGE_ROOT and SAGE_LOCAL optional

comment:7 Changed 23 months ago by mkoeppe

  • Branch set to u/mkoeppe/src_bin_sage_env__make_sage_env_config_and_sage_local_optional

comment:8 Changed 23 months ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Cc arojas isuruf thansen jhpalmieri added
  • Commit set to c6ed97f5ebc649c160581fe1266681fe50045064
  • Description modified (diff)
  • Status changed from new to needs_review

New commits:

c6ed97fsrc/bin/sage-env: Make SAGE_ROOT and SAGE_LOCAL optional

comment:9 Changed 23 months ago by mkoeppe

  • Description modified (diff)

comment:10 Changed 23 months ago by mkoeppe

Needs review.

comment:11 Changed 23 months ago by mkoeppe

Hoping to get some feedback whether this change is helpful for distribution packaging

comment:12 Changed 23 months ago by fbissey

I cannot talk about other distros. I have stopped using and shipping sage-env a while back in Gentoo. I only set the following with a patch in the sage executable these days

  • SAGE_STARTUP_FILE
  • SAGE_RC_FILE
  • SAGE_DEBUG
  • SAGE_BROWSER

For the rest, whatever is in env.py or sage_conf.py is enough.

The main issue is that a lot of stuff in there is not that useful at runtime. You need PATH properly set and a few other in case you compile something from inside sage but most of the stuff in sage-env is not useful anymore once at run-time. I guess you may want to load the sage variables if you start sage -sh but that's it.

comment:13 Changed 23 months ago by arojas

same here, haven't installed sage-env for a long time

comment:14 Changed 22 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3

comment:15 Changed 22 months ago by git

  • Commit changed from c6ed97f5ebc649c160581fe1266681fe50045064 to 53805b0bd4166f47b66bdadea5678c1153f5075a

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

53805b0src/bin/sage-env: Make SAGE_ROOT and SAGE_LOCAL optional

comment:16 Changed 21 months ago by git

  • Commit changed from 53805b0bd4166f47b66bdadea5678c1153f5075a to 09584ea0ebabd9bb1f804d89598d54a1e7c9cd6d

Branch pushed to git repo; I updated commit sha1. New commits:

09584eaMerge tag '9.2.beta14' into t/29951/src_bin_sage_env__make_sage_env_config_and_sage_local_optional

comment:17 Changed 20 months ago by git

  • Commit changed from 09584ea0ebabd9bb1f804d89598d54a1e7c9cd6d to a2571b118c1bb0874c945922e34f15c97204b203

Branch pushed to git repo; I updated commit sha1. New commits:

a2571b1Merge tag '9.2' into t/29951/src_bin_sage_env__make_sage_env_config_and_sage_local_optional

comment:18 Changed 20 months ago by git

  • Commit changed from a2571b118c1bb0874c945922e34f15c97204b203 to 9ba8cf2975545882f8c0d60f1faf193524726305

Branch pushed to git repo; I updated commit sha1. New commits:

9ba8cf2Merge tag '9.3.beta0' into t/29951/src_bin_sage_env__make_sage_env_config_and_sage_local_optional

comment:19 Changed 20 months ago by mkoeppe

Let's get this in please, as a path toward unpatched installation of sagelib in downstream packaging.

comment:20 Changed 20 months ago by mkoeppe

  • Cc gh-jamesjer added

comment:21 Changed 20 months ago by git

  • Commit changed from 9ba8cf2975545882f8c0d60f1faf193524726305 to c8e69100d6b4ba30a3854266fbaa83aa3982f4a3

Branch pushed to git repo; I updated commit sha1. New commits:

c8e6910Merge tag '9.3.beta1' into t/29951/src_bin_sage_env__make_sage_env_config_and_sage_local_optional

comment:22 Changed 20 months ago by dimpase

  • Reviewers set to Dima Pasechnik

lgtm

comment:23 Changed 20 months ago by dimpase

  • Status changed from needs_review to positive_review

comment:24 Changed 20 months ago by gh-jamesjer

Thank you for thinking of distribution needs. Speaking for Fedora, I am in favor of this change.

comment:25 Changed 20 months ago by mkoeppe

  • Reviewers changed from Dima Pasechnik to Dima Pasechnik, Jerry James

Thanks for the review!

comment:26 Changed 20 months ago by vbraun

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