Opened 4 years ago

Closed 4 years ago

#20721 closed enhancement (fixed)

Unpack all upstream tarballs into 'src' directory

Reported by: embray Owned by:
Priority: major Milestone: sage-7.3
Component: build Keywords:
Cc: Merged in:
Authors: Erik Bray Reviewers: Matthias Koeppe
Report Upstream: N/A Work issues:
Branch: 69d5c9b (Commits) Commit:
Dependencies: Stopgaps:

Description

When building an spkg the upstream tarball is unpacked into the temporary build directory, and then with a 'hack' [here http://git.sagemath.org/sage.git/tree/build/bin/sage-spkg?h=develop&id=769ff190413123f3b0c21a16ea69c63e3f99c43a#n537] to try to figure out what directory the tarball is extracted to, and then rename it to src. This doesn't always work for all packages, and in some packages they get extracted to something else, leading to inconsistencies in spkg-installs. It would be nice if the upstream source can always be found in src.

This idea came about in the discussion in #20692 starting around here: http://trac.sagemath.org/ticket/20692#comment:18

This adds one more small step toward more consistency between spkgs.

It might also be worth clarifying in the documentation that (as of this patch) the upstream source should always wind up in src/.

Change History (14)

comment:1 Changed 4 years ago by embray

  • Status changed from new to needs_review

comment:2 Changed 4 years ago by mkoeppe

I can confirm that it builds the "latte_int" package correctly with this change.

comment:3 Changed 4 years ago by mkoeppe

  • Status changed from needs_review to needs_work

However,

SAGE_CHECK=yes sage -f latte_int

yields an error because of the changed directories.

comment:4 Changed 4 years ago by embray

Oops, I'll fix that, and check the other updated packages as well.

comment:5 Changed 4 years ago by git

  • Commit changed from 4208ddd8990281345caba97a4c42280571f04ad8 to 69d5c9b762c8d4a86c085baafa6a0bad1ebd80db

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

69d5c9bFix any spkg-checks for the updated packages.

comment:6 follow-up: Changed 4 years ago by embray

Fixed the relevant spkg-checks.

Incidentally, one of the tests for latte_int failed until I installed 4ti2. Not relevant to this ticket, but I thought it was worth noting--4ti2 is not listed as a dependency of latte_int. Should it be? (I have no idea what these packages are.)

comment:7 in reply to: ↑ 6 Changed 4 years ago by mkoeppe

Replying to embray:

Fixed the relevant spkg-checks.

Thanks.

Incidentally, one of the tests for latte_int failed until I installed 4ti2. Not relevant to this ticket, but I thought it was worth noting--4ti2 is not listed as a dependency of latte_int. Should it be? (I have no idea what these packages are.)

Yes, it should. In fact, both 4ti2 and latte_int should get 'dependencies' files. This is an spkg feature I wasn't aware of, thanks for mentioning it.

comment:8 Changed 4 years ago by mkoeppe

  • Reviewers set to Matthias Koeppe

comment:9 Changed 4 years ago by mkoeppe

  • Status changed from needs_work to positive_review

comment:10 Changed 4 years ago by embray

Before merging this I should also add a note in http://doc.sagemath.org/html/en/developer/packaging.html stating explicitly that the upstream sources are now always unpacked into "src/"

comment:11 Changed 4 years ago by vbraun

  • Branch changed from u/embray/spkg-std-src-unpack to 69d5c9b762c8d4a86c085baafa6a0bad1ebd80db
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:12 Changed 4 years ago by vbraun

  • Commit 69d5c9b762c8d4a86c085baafa6a0bad1ebd80db deleted

Argparse is Python 2.7+ only, this ticket implicitly removed support for building sage with Python 2.6 and below. See also #19984, #20023

comment:13 Changed 4 years ago by vbraun

  • Resolution fixed deleted
  • Status changed from closed to new

Fails on OSX:

**********************************************************************
File "src/sage/structure/sage_object.pyx", line 1526, in sage.structure.sage_object.unpickle_all
Failed example:
    sage.structure.sage_object.unpickle_all()
Expected:
    Successfully unpickled ... objects.
    Failed to unpickle 0 objects.
Got:
    tar: Failed to set default locale
    Successfully unpickled 586 objects.
    Failed to unpickle 0 objects.
**********************************************************************
1 item had failures:
   2 of  11 in sage.structure.sage_object.unpickle_all
    [204 tests, 2 failures, 12.10 s]

comment:14 Changed 4 years ago by vbraun

  • Resolution set to fixed
  • Status changed from new to closed

Never mind that was due to an environment variable change.

Note: See TracTickets for help on using tickets.