Rewrite packaging system, rip out Mercurial #63
Conversation
depdist.sh will be used to create a dist/ directory which should be moved to the sagenb spkg directory and renamed to src/ . fetch_deps.py is a helper script for depdist.sh which uses distribute internals to fetch package tarballs from PyPI.
`setup.py 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.
Conflicts: Makefile
Here's an example of a sagenb SPKG created by 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. |
Apparently you can't set a branch to track a remote tracking branch that you haven't fetched yet.
SPKG updated according to the latest commit: http://wstein.org/home/keshav/files/sagenb-0.9.1.spkg (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? |
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. |
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.
New behavior: `./dist.sh` prepares tarballs of sagenb and its dependencies in dist/ , and `./dist.sh -g` additionally places an optimized copy of the git repository in dist/
OK, so packaging the git repo is now optional. Pass New SPKG is up at the same URL: http://wstein.org/home/keshav/files/sagenb-0.9.1.spkg |
When I run dist.sh, I see the following:
Then everything seems to get downloaded successfully. I also see
I have no idea what this means. Otherwise, everything looks good, and the new SPKG.txt file has good directions for how to use dist.sh. Should SPKG.txt list the non-included dependencies also, like Python, to record where it should go in |
Oh, it might be a good idea to provide instructions (in SPKG.txt? at the top of dist.sh?) for how to use the git repository in the directory |
Those don't appear on a stable connection, such as on sage.math.
To make sure github renders it correctly, our readme is called README.rst, so setuptools complains - this can be ignored (it's only a warning).
Good idea. |
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 |
No, the instructions are correct - spkg-install will install the git repo correctly if sagenb.git is present in the src directory. |
Good idea. I'll add it when I'm back in front of a computer in a day or so :) |
Oh, right. Sorry. |
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: http://wstein.org/home/keshav/files/sagenb-0.9.1.spkg |
I think this looks good now. I've reviewed the changes and tried out dist.sh. Everything seems to work. Does that suffice for a positive review? |
Yup! Thanks for helping me out with this! |
Rewrite packaging system, rip out Mercurial
I've considerably simplified the packaging system. The new SPKG is
uncompressed, and has a Mercurial repository tracking
spkg-install
etal. like all other SPKGs do. The
src/
directory consists of a bunch ofsource 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
removed.