Opened 2 years ago

Closed 2 years ago

#30771 closed defect (fixed)

Repair self-containedness of the wrapped spkg-install scripts for Python packages

Reported by: Matthias Köppe Owned by:
Priority: major Milestone: sage-9.3
Component: build Keywords:
Cc: gh-kliem, John Palmieri Merged in:
Authors: Matthias Koeppe Reviewers: John Palmieri
Report Upstream: N/A Work issues:
Branch: 3cd351c (Commits, GitHub, GitLab) Commit: 3cd351c795a86552354569e203dc849e07e5af1c
Dependencies: Stopgaps:

Status badges

Description (last modified by Matthias Köppe)

Follow-up from #29500.

When an spkg fails to install, Sage advises:

[pynormaliz-2.12] If you want to try to fix the problem yourself, *don't* just cd to
[pynormaliz-2.12] /Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/var/tmp/sage/build/pynormaliz-2.12 and type 'make' or whatever is appropriate.
[pynormaliz-2.12] Instead, the following commands setup all environment variables
[pynormaliz-2.12] correctly and load a subshell for you to debug the error:
[pynormaliz-2.12]   (cd '/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/var/tmp/sage/build/pynormaliz-2.12' && '/Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/sage' --buildsh)

In the shell set up with this command, one used to be able to just type ./spkg-install to re-run the (wrapped) installation script.

#29500 inadvertently broke this for Python packages because sdh_pip_install now depends on an additional environment variable that is set in sage-spkg: SAGE_SPKG_WHEELS. This leads to the following error:

Successfully installed PyNormaliz-2.12
Removed build tracker: '/private/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gp/T/pip-req-tracker-kweqslvi'
mkdir: : No such file or directory
********************************************************************************
Error storing dist/PyNormaliz-2.12-cp37-cp37m-macosx_10_9_x86_64.whl
********************************************************************************

We fix it by setting this variable in the wrapped spkg-install scripts.

Blocker for 9.2 because this defect interferes with the debugging of spkg scripts; and because the priority "critical" seems to be ignored by the release management scripts.

Change History (13)

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

Branch: u/mkoeppe/repair_self_containedness_of_the_wrapped_spkg_install_scripts_for_python_packages

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

Authors: Matthias Koeppe
Cc: John Palmieri added
Commit: 3cd351c795a86552354569e203dc849e07e5af1c
Status: newneeds_review

New commits:

3cd351cbuild/bin/sage-spkg: Set SAGE_SPKG_WHEELS in wrapped scripts

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

Can we get this into Sage 9.2 please?

comment:4 Changed 2 years ago by John Palmieri

The change seems innocuous, but I'm not sure how to test it.

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

Interrupt an installation of a Python package with ^C (or provoke an error otherwise), then restart the installation as described in the ticket

Last edited 2 years ago by Matthias Köppe (previous) (diff)

comment:6 Changed 2 years ago by John Palmieri

Reviewers: John Palmieri
Status: needs_reviewpositive_review

Okay, it works for me. I'm not sure why you wouldn't just try make PKG, but I guess for some debugging people might want to run spkg-install directly. It doesn't strike me as critical, but whatever.

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

Thanks!

comment:8 in reply to:  6 Changed 2 years ago by Matthias Köppe

Replying to jhpalmieri:

I'm not sure why you wouldn't just try make PKG

This unpacks the tarball another time. For debugging, it is useful to make changes to the unpackaged source tree.

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

Description: modified (diff)
Priority: criticalblocker

comment:10 Changed 2 years ago by Volker Braun

Priority: blockermajor

Better development experience can't be a blocker

comment:11 Changed 2 years ago by gh-kliem

I don't think this is developers only. I hope that optional packages are also used by non-developers.

Failure to install packages is unfortunately still common and could happen to anyone compiling sage from source. The standard debugging instruction as in the description of this ticket should work and I think such a tiny fix should go into the next master branch.

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

Milestone: sage-9.2sage-9.3

comment:13 Changed 2 years ago by Volker Braun

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