On 12 Aug., 14:51, Rita Morgan <rmorgan...@gmail.com> wrote: > I have a spkg I would like to recompile with different parameters, > what is the recommended way of doing it?
Depends on what parameters you want to change. You can usually set CC, CFLAGS etc., and some packages recognize additional environment variables to pass further options to 'configure' (e.g. PARI_EXTRA_OPTS). If you just want to compile it with different CFLAGS for example, just do env CFLAGS="-my -special -flags" ./sage -f <packagename> > I usually do this: > * untar the spkg > * make my changes > * recreate the spkg > * sage -i newspkg In case you bump the patch level (or even use a higher version number), and put your updated spkg into $SAGE_ROOT/spkg/standard (assuming it is a standard Sage package), running ./sage -i <packagename> is sufficient in the first place, as it will pick up the most recent version. If you don't change the patch level (i.e., use the same filename), you have to do ./sage -f <packagename> (-f: force [re]installation). > Will this rebuild my dependencies because that would be the desired > behavior? Not the above procedures. To also rebuild all spkgs that depend on your modified one, you currently have to do the following: [Copy the spkg into Sage's appropriate directory as above. You don't have to bump the patch level.] Then from the $SAGE_ROOT directory, run env SAGE_UPGRADING=yes make build (Omitting the "build" would also rebuild the documentation afterwards, which you can separately do by running "make doc".) Note that this may trigger the rebuild of many packages, and hence take some time. To see which packages would get rebuilt (dry run), you currently have to issue the following weird command: env MAKE="make -n" SAGE_PARALLEL_SPKG_BUILD=yes make build which also gives some more output than you'd like; you can pipe it to "grep sage-spkg", or use a more fancy variant: env MAKE="make -n" SAGE_PARALLEL_SPKG_BUILD=yes make build | sed -n -e 's/.*} //' -e 's/ 2>&1.*//p' which just prints the names of the spkgs that would get rebuilt / reinstalled. Also, as a side effect, the current Sage library branch will be switched back to "main" (devel/sage-main/) whenever the Sage library package gets reinstalled / rebuilt. Changes made to the main branch *should* not get overwritten though [provided you haven't changed the Sage library spkg itself]; other branches ("clones") aren't touched at all, you may just eventually have to switch back to your previously current one (in case it wasn't "main"), and run "./sage -b" afterwards to update that branch. Unfortunately the Python extension module dependencies aren't complete yet; to overcome this, you can instead run "./sage -ba-force" to unconditionally rebuild all of them, but this should only rarely be necessary. The above is more or less just a by-product of upgrading, potentially subject to change, and therefore intentionally currently undocumented. Sorry for the inconvenience, we'll hopefully ease this by adding some 'make' targets in future releases. -leif -- 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