#30622 closed enhancement (fixed)
build/bin/sagespkg: Handle an optional argument to set the installation tree (default SAGE_LOCAL)
Reported by:  mkoeppe  Owned by:  

Priority:  major  Milestone:  sage9.3 
Component:  build  Keywords:  sd111 
Cc:  jhpalmieri, mjo, ghkliem  Merged in:  
Authors:  Matthias Koeppe  Reviewers:  Jonathan Kliem 
Report Upstream:  N/A  Work issues:  
Branch:  7ea44f7 (Commits, GitHub, GitLab)  Commit:  
Dependencies:  Stopgaps: 
Description (last modified by )
We handle a new optional argument to sagespkg
, which sets the installation tree  the new variable SAGE_INST_LOCAL
(default: $SAGE_LOCAL
) for the package installation scripts. (The script sagespkguninstall
already accepts this optional argument.)
We also move the definition of SAGE_SPKG_INST
and SAGE_SPKG_WHEELS
out of build/bin/install
into sagespkg
(and into Makefile.in
for script packages). This is so that they can depend on SAGE_INST_LOCAL
.
Thus, the installation location of the installation records now depends on the installation tree  it is $SAGE_INST_LOCAL/var/lib/sage/{installed,scripts,wheels}
.
This is preparation for #29013  which proposes to install Python packages in $SAGE_VENV
instead of $SAGE_LOCAL
.
Change History (37)
comment:1 Changed 2 years ago by
Description:  modified (diff) 

Summary:  build/bin/sagespkg: Allow overriding SAGE_LOCAL by SAGE_SPKG_PREFIX → build/bin/sagespkg: Allow overriding SAGE_LOCAL by SAGE_INST_LOCAL 
comment:2 Changed 2 years ago by
Dependencies:  → #29500 

comment:3 Changed 2 years ago by
Branch:  → u/mkoeppe/build_bin_sage_spkg__allow_overriding_sage_local_by_sage_spkg_prefix 

comment:4 Changed 2 years ago by
Commit:  → 8fc7f9ca20d6665425d0332070c6e7e3dc3968c9 

comment:5 Changed 2 years ago by
Dependencies:  #29500 → #29500, #29386 

comment:6 Changed 2 years ago by
Dependencies:  #29500, #29386 → #29500, #29386, #30657 

comment:7 Changed 2 years ago by
Commit:  8fc7f9ca20d6665425d0332070c6e7e3dc3968c9 → a713c390686ce8da37f0c0268059d3b522c0d0d3 

Branch pushed to git repo; I updated commit sha1. New commits:
0f1b7aa  build/make/install: Do not set SAGE_SPKG_INST here; set it in build/make/Makefile.in

1baf8ea  WIP

bd0fd2f  Merge branch 't/29500/install_all_python_packages_via_pip_wheel__create_pep_503_simple_repository_for_wheels' into t/30657/fix_up__sage__p_

2e20f23  build/bin/sagespkg: Move SAGE_SPKG_{INST,SCRIPTS,WHEELS} setting here from build/bin/install, make them relative to SAGE_INST_LOCAL

be2417c  Merge tag '9.2.beta14' into t/30657/fix_up__sage__p_

8ee7ee2  build/make/install: Set SAGE_SPKG_WHEELS also here so that script packages still work

a713c39  Merge branch 't/30657/fix_up__sage__p_' into t/30622/build_bin_sage_spkg__allow_overriding_sage_local_by_sage_spkg_prefix

comment:8 Changed 2 years ago by
Authors:  → Matthias Koeppe 

comment:9 Changed 2 years ago by
Commit:  a713c390686ce8da37f0c0268059d3b522c0d0d3 → 333c5b5668b7290f074bcf65fc421a58a3cd74eb 

comment:10 Changed 2 years ago by
Dependencies:  #29500, #29386, #30657 

Description:  modified (diff) 
Summary:  build/bin/sagespkg: Allow overriding SAGE_LOCAL by SAGE_INST_LOCAL → build/bin/sagespkg: Handle an optional argument to set the installation tree (default SAGE_LOCAL) 
comment:11 Changed 2 years ago by
Commit:  333c5b5668b7290f074bcf65fc421a58a3cd74eb → dbbd614955b84bb7379f5222b3717051abc8ab14 

Branch pushed to git repo; I updated commit sha1. New commits:
dbbd614  build/bin/sagespkg: From bash x back to bash

comment:12 Changed 2 years ago by
Cc:  jhpalmieri mjo added 

Status:  new → needs_review 
comment:13 Changed 2 years ago by
Status:  needs_review → needs_work 

comment:14 Changed 2 years ago by
Commit:  dbbd614955b84bb7379f5222b3717051abc8ab14 → cb151691167c0317214ddc4657ea5efc2691776c 

Branch pushed to git repo; I updated commit sha1. New commits:
cb15169  Makefile, build/make/Makefile.in: Fix 'make list'

comment:15 Changed 2 years ago by
Status:  needs_work → needs_review 

comment:16 Changed 2 years ago by
Cc:  ghkliem added 

comment:17 Changed 2 years ago by
Reviewers:  → https://github.com/kliem/sage/pull/29/checks 

comment:18 Changed 2 years ago by
Keywords:  sd111 added 

Hoping we can make progress on this ticket this week  https://wiki.sagemath.org/days111
comment:19 Changed 2 years ago by
Reviewers:  https://github.com/kliem/sage/pull/29/checks → Jonathan Kliem 

Status:  needs_review → positive_review 
LGTM.
comment:22 Changed 2 years ago by
Work issues:  → merge #30375 

comment:23 Changed 2 years ago by
Commit:  cb151691167c0317214ddc4657ea5efc2691776c → 9c9b3bf8a52544285935dac66e0589769bac363c 

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
9c5e8a2  add references to `bin/sagebuildenv` and `bin/sagebuildenvconfig`

4b8933b  remove incorrect `$` in `build/bin/sagebuildenv`

071b8cc  Revert "add references to `bin/sagebuildenv` and `bin/sagebuildenvconfig`"

c51e752  correct comments to makefile

aa7ecd6  fix that we might have changed $FCFLAGS during configure

94326db  better solution for dealing with ffreeform

87dae61  keep FCFLAGS during gfortran configure

7577dd4  added quotes

3bb3099  prepare preciouos variables

9c9b3bf  Merge commit '3bb309944b7e8542b2ac88ed3c9d9a60e68644d7' of git://trac.sagemath.org/sage into t/30622/build_bin_sage_spkg__allow_overriding_sage_local_by_sage_spkg_prefix

comment:24 Changed 2 years ago by
Dependencies:  → #30375 

Status:  needs_work → positive_review 
Work issues:  merge #30375 
Merged #30375
comment:25 Changed 2 years ago by
Branch:  u/mkoeppe/build_bin_sage_spkg__allow_overriding_sage_local_by_sage_spkg_prefix → 9c9b3bf8a52544285935dac66e0589769bac363c 

Resolution:  → fixed 
Status:  positive_review → closed 
comment:26 Changed 2 years ago by
Branch:  9c9b3bf8a52544285935dac66e0589769bac363c → u/mkoeppe/build_bin_sage_spkg__allow_overriding_sage_local_by_sage_spkg_prefix 

Resolution:  fixed 
Status:  closed → new 
Breaks making source tarballs:
Sage version 9.3.beta5, release date 20201227 Cloning into '/home/release/Sage/tmp/sage9.3.beta5'... done. Enumerating objects: 737573, done. Counting objects: 100% (737573/737573), done. Delta compression using up to 16 threads Compressing objects: 100% (702757/702757), done. Writing objects: 100% (737573/737573), done. Total 737573 (delta 588187), reused 141018 (delta 0), packreused 0 Checking connectivity: 737573, done. Finished cloning Sage sources Makefile:22: *** This Makefile needs to be invoked by build/make/install. Stop. Traceback (most recent call last): File "/home/release/opt/bin/gitreleasemgr", line 16, in <module> cmdline.launch() File "/home/release/opt/gittraccommand/git_trac/releasemgr/cmdline.py", line 166, in launch app.release(args.version, check=args.check) File "/home/release/opt/gittraccommand/git_trac/releasemgr/app.py", line 315, in release create_tarball() File "/home/release/opt/gittraccommand/git_trac/releasemgr/make_release.py", line 15, in create_tarball check_call(['sage', 'sdist']) File "/home/release/opt/conda/lib/python2.7/subprocess.py", line 190, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['sage', 'sdist']' returned nonzero exit status 2
comment:27 Changed 2 years ago by
Commit:  9c9b3bf8a52544285935dac66e0589769bac363c → 062ef926118ea779aec0af92530079f140f276bc 

comment:28 Changed 2 years ago by
Status:  new → needs_review 

comment:29 Changed 2 years ago by
Dependencies:  #30375 

comment:30 followup: 32 Changed 2 years ago by
There is two small things that could be fixed along the way:
make dist
does not appear inmake help
.local/bin/sagesdist
claims it should be called byspkg/bin/sage
, but it is really run bylocal/bin/sage
.
The error message This Makefile needs to be invoked by build/make/install
seems strange, as there is at least one other legal way to call the Makefile, as we discovered here. If it is not included in the message, I think the comment should be more verbose.
comment:31 Changed 2 years ago by
Commit:  062ef926118ea779aec0af92530079f140f276bc → 6eb8f26b9edfa806c8b5e2453d6b6f6e0f54b5ab 

Branch pushed to git repo; I updated commit sha1. New commits:
6eb8f26  build/bin/sagesdist: Update file comment

comment:32 Changed 2 years ago by
Replying to ghkliem:
There is two small things that could be fixed along the way:
make dist
does not appear inmake help
.
My version of make
here on macOS does not list any targets on make help
. In any case, beyond the scope of the ticket.
local/bin/sagesdist
claims it should be called byspkg/bin/sage
, but it is really run bylocal/bin/sage
.
Updated.
comment:33 Changed 2 years ago by
Commit:  6eb8f26b9edfa806c8b5e2453d6b6f6e0f54b5ab → 7ea44f7f8faf65d0061d97b53a53e73151716d94 

Branch pushed to git repo; I updated commit sha1. New commits:
7ea44f7  build/make/Makefile.in: Expand comment

comment:36 Changed 2 years ago by
Branch:  u/mkoeppe/build_bin_sage_spkg__allow_overriding_sage_local_by_sage_spkg_prefix → 7ea44f7f8faf65d0061d97b53a53e73151716d94 

Resolution:  → fixed 
Status:  positive_review → closed 
comment:37 Changed 2 years ago by
Commit:  7ea44f7f8faf65d0061d97b53a53e73151716d94 

Apparently we broke sage b
with this ticket.
Branch pushed to git repo; I updated commit sha1. New commits:
Merge tag '9.2.beta13' into t/29500/install_all_python_packages_via_pip_wheel__create_pep_503_simple_repository_for_wheels
Merge branch 't/29500/install_all_python_packages_via_pip_wheel__create_pep_503_simple_repository_for_wheels' into t/30622/build_bin_sage_spkg__allow_overriding_sage_local_by_sage_spkg_prefix