On Mon, Sep 7, 2009 at 1:40 PM, Ralf Hemmecke<r...@hemmecke.de> wrote: > > I'd like to write an optional sage package B that depends on another > optional sage package A. > > What is the standard way to achieve that > > sage -i B > > looks at http://www.sagemath.org/packages/optional/ for B and first > installs A if A is not yet locally installed? > > Is there already any automatic dependency tracking in sage's package > installation scripts? > > To be more precise. In my case I need that the installation of B does > something like 'sage -i -s A', i.e. keeps the build dir of A. > > Any hint is appreciated.
In fact there is no standard way to do this. Amazingly nobody has written anything to do this. It wouldn't be hard, but it needs some discussion. Here's the simplest possible solution I can think of: 1. Put "sage -i B" at the top of you spkg-install script 2. Improve the "sage -i" command so that "sage -i B" works and gives the newest version, i.e., so that one doesn't have to type "sage -i B-1.1.p2.spkg". I regret not doing (2) back in 2005 on the weekend when I wrote the build/package system. Unfortunately, nobody has done it since, except that in Sage you can do sage: install_package('B') and that will work. So one other option might be to do: 1. sage -c "install_package('B')" in your spkg-install. However, I'm open to other ideas. Ralf, what do you *wish* would be the natural way to specify dependencies? William --~--~---------~--~----~------------~-------~--~----~ 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 URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---