On Mar 19, 1:36 am, William Stein <wst...@gmail.com> wrote: > On Fri, Mar 19, 2010 at 1:31 AM, Dan Drake <dr...@kaist.edu> wrote: > > On Fri, 19 Mar 2010 at 12:52AM -0700, William Stein wrote: > >> The main issue I see is that using getopt or optparse means that the > >> "local/bin/sage-sage" script will go from not depending on Python to > >> depending on Python. This may cause trouble for the build system, and
No, it builds fine for me: I said this in the original post. I also just temporarily deleted my system version of Python and tried again. It had no problems getting past building python, so I think it should work just fine for the whole build. (I think I also said that I hadn't looked at any optional packages; some of them might very well break.) > >> may slow down commands such as "sage -gp", since doing "sage -gp" now > >> means also starting Python, in addition to Pari. > > > Good point -- although Python does start very fast. > > PARI starts up nearly twice as fast as Python (for me on boxen.math): > > wst...@boxen:~$ time sage -gp < /dev/null > real 0m0.030s > user 0m0.000s > sys 0m0.010s > wst...@boxen:~$ time sage -python < /dev/null > real 0m0.048s > user 0m0.020s > sys 0m0.020s > > Other commands such as "sage -hg" will also suddenly take 50% longer > if we make this switch using Python. 50% is one way to say it, but (on my machine) 0.06 seconds is another way. I don't think I'll notice the difference when running "sage -- hg". I don't use "sage --gp", but I don't see this being a problem for just running the command-line interpreter -- a slight delay at the beginning is not a big deal. If you are going to run "sage --gp", passing it a single command to execute, and repeating it many times, then there might be an issue, but then you should do "sage --sh" first, then just use "gp" to avoid any overhead. > > I see that bash has > > a "getopts" builtin, although it doesn't do --style arguments. I > > downloaded shflags, which Tim suggested, and using it amounts to sourcing a > > 31KB shell library, which seems like a pretty reasonable, uh, option -- > > check outhttp://code.google.com/p/shflags/wiki/Documentation10x > > How long does it take? This may be an option (but Dan Drake's post suggests otherwise?), but not written by me: I don't know how to write shell scripts. If someone else wants to do this, please go ahead. Meanwhile, I've posted a Python/optparse version at <http://trac.sagemath.org/sage_trac/ticket/21>. This deletes the "sage --darcs" option but keeps all of the others. -- John -- 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.