On Sun, Mar 28, 2010 at 4:02 PM, Simon King <simon.k...@nuigalway.ie> wrote: > Hi David, > > On 29 Mrz., 00:31, "Dr. David Kirkby" <david.kir...@onetel.net> wrote: >> ... >> That's not going to work until python is installed. Why not make it a shell >> script instead - it would work before python is built, irrespective of >> whether >> someone has python installed on their machine. > > For the application that I have in mind -- namely in spkg-install for > optional packages, and perhaps for upgrading (so that one needs to > find out whether one component is outdated) -- it is granted that > python is present, because at that point Sage is already built. > > If I understand correctly, the tasks are > - to test whether SAGE_ROOT/spkg/installed/ contains a file whose > name begins with a given string, and > - if there are several such files, to extract and compare the version > numbers and return the file name that belongs to the highest version > number. > > I have no idea how to accomplish the second task with a shell script > (I am pretty much of a newbie in shell scripts). And even for the > first task I could imagine that there is a problem of platform > specific shell commands (but you certainly know better than I).
Moreover, even if you could, a lot of people probably couldn't read the results. Also, another assumption that is fair to make is that most Sage users are fluent in Python. > > For extacting the version numers, can we assume that any spkg "foo" > will have a name including the version number like foo- > x[.y[.z[...]]].spkg, where x,y,z,... are numbers, except for the last > one, which can be of the form 'p' plus a number? Is that assumption true of all current standard and optional spkg's? You can check as easily as I. If so, we could make it a requirement. However, if we do, then we *must* add logic to verify this to the "sage -pkg" command, since making it a requirement by putting it on some wiki page somewhere, won't work. -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org To unsubscribe from this group, send email to sage-devel+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.