Rewrite packaging system, rip out Mercurial #63

merged 19 commits into from Jun 20, 2012

2 participants

Sage Mathematical Software System member

I've considerably simplified the packaging system. The new SPKG is
uncompressed, and has a Mercurial repository tracking spkg-install et
al. like all other SPKGs do. The src/ directory consists of a bunch of
source tarballs of dependencies, an sdist tarball of sagenb itself,
and (optionally) a copy of the git repository of sagenb suitable for
beginning development from.

References to Mercurial, dependencies on Mercurial tools, etc. are also

kini added some commits Jun 12, 2012
@kini kini Fix stripping 62099fb
@kini kini Clean up bfdffa0
@kini kini Switch stuff to git 1237b7b
@kini kini Add some scripts to automate packaging of deps will be used to create a dist/ directory which should be
moved to the sagenb spkg directory and renamed to src/ . is a helper script for which uses distribute
internals to fetch package tarballs from PyPI.
@kini kini Put fetch_deps in util/ 74a53e4
@kini kini Moved SPKG.txt to the SPKG's own repo 83c7fab
@kini kini Delete old packaging system and some old files 9ebcc69
@kini kini Rename to; sanitize git repo f37537b
@kini kini Remove outdated Makefile 97a817f
@kini kini Fix packaging of git repo
` sdist` doesn't copy empty directories, as I found out after
a lot of head scratching. This breaks git repos, so we can't trust sdist
to copy our git repo into the source tarball of sagenb. So we'll store
the git repo separately as sagenb.git , and move it into place when
running spkg-install.
@kini kini Make sure the staging area is clean too 8f14524
@kini kini Add sagemath/sagenb github remote to the new repo 600bd94
@kini kini Remove hg-git dependencies f0ecab2
@kini kini Merge branch 'master' into packaging
@kini kini referenced this pull request Jun 14, 2012

Jmol enhancements #61

Sage Mathematical Software System member

Here's an example of a sagenb SPKG created by after these commits:

You will need to take a look at it in order to review this branch because it contains the new SPKG repo I made for sagenb.

@kini kini Fix github remote tracking
Apparently you can't set a branch to track a remote tracking branch that
you haven't fetched yet.
Sage Mathematical Software System member

SPKG updated according to the latest commit: (same link)


Would it make any sense to omit the git repository and instead document how to install it for people who want to work on sagenb development?

Sage Mathematical Software System member

In my opinion, yes, absolutely. Sage currently ships its repositories inside both source and binary tarballs, which is unorthodox to say the least. The stated goal is to make the barrier of entry to development extremely low in order to gather mathematicians who are not experienced software engineers and open-source development collaborators, but who nonetheless have been hacking on Sage for their own purposes/research, and entice them to give us their code by making it extremely easy to do so. But I don't think this goal makes much sense in the context of sagenb, which is a web app and doesn't really seek contributions from inexperienced programmers who are experts in some other field.

kini added some commits Jun 15, 2012
@kini kini Insert old advice from SPKG.txt
This old advice for release management of sagenb was in the SPKG.txt and
was generally out of date. Since the SPKG will now only contain a bunch
of tarballs, a lot of those instructions don't make much sense there, so
I've moved them to the sagenb README for now.
@kini kini Fix dumb oversight 5c5802a
@kini kini Make packaging the git repo optional
New behavior: `./` prepares tarballs of sagenb and its
dependencies in dist/ , and `./ -g` additionally places an
optimized copy of the git repository in dist/
Sage Mathematical Software System member

OK, so packaging the git repo is now optional. Pass -g to if you want a git repo.

New SPKG is up at the same URL:


When I run, I see the following:

Download error: [Errno 61] Connection refused -- Some packages may not be found!
Download error: [Errno 61] Connection refused -- Some packages may not be found!
Download error: [Errno 61] Connection refused -- Some packages may not be found!
Download error: [Errno 61] Connection refused -- Some packages may not be found!

Then everything seems to get downloaded successfully. I also see

warning: sdist: standard file not found: should have one of README, README.txt

I have no idea what this means.

Otherwise, everything looks good, and the new SPKG.txt file has good directions for how to use Should SPKG.txt list the non-included dependencies also, like Python, to record where it should go in SAGE_ROOT/spkg/standard/deps?


Oh, it might be a good idea to provide instructions (in SPKG.txt? at the top of for how to use the git repository in the directory sagenb.git, if you run -g. (I think you should unpack sagenb-0.9.1.tar.gz and then move sagenb.git to sagenb-0.9.1/.git. Is that right?)

Sage Mathematical Software System member

Those don't appear on a stable connection, such as on sage.math.

I just tested, and I also see them on sage.math (although with "Errno 111" instead of "Errno 61"). Also, they are completely reproducible: I see four of these "Download error" messages every time I run the script. Maybe you could add a print statement print "Fetching {0} ...".format(pkg) at the start of the loop, so that the later message "Fetched ..." will reassure the user that the desired package was retrieved successfully.

Sage Mathematical Software System member
Sage Mathematical Software System member

No, the instructions are correct - spkg-install will install the git repo correctly if sagenb.git is present in the src directory.

Oh, right. Sorry.

Sage Mathematical Software System member

OK, I've made the changes you suggested - the ones to the dist scripts in the above commit, and the ones to SPKG.txt in the new SPKG I've just uploaded to the same URL as before:


I think this looks good now. I've reviewed the changes and tried out Everything seems to work. Does that suffice for a positive review?

Sage Mathematical Software System member

Yup! Thanks for helping me out with this!

@kini kini merged commit b0ce4e7 into sagemath:master Jun 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment