On 2/22/11 2:19 PM, Jason Grout wrote:
There are lots of times when it would be convenient to have the
documentation of various spkgs installed in a local or system Sage
installation. For example, it seems that I'm always wishing that I had
that at an airport or on an airplane. At one point a long time ago, we
had an extradocs spkg, but it was never maintained. So here is a proposal:

When building an spkg, if the SAGE_SPKG_INSTALL_DOCS environment
variable is yes, then the docs are built (if available in the spkg) and
are installed in $SAGE_ROOT/local/share/doc/<SPKG NAME>/

For example, numpy includes the docs with the sources. I'd like to
insert the following at the bottom of the numpy spkg-install:

if [ "x$SAGE_SPKG_INSTALL_DOCS" = xyes ] ; then
cd doc
make html
if [ $? -ne 0 ]; then
echo "Error building numpy."
exit 1
fi
mkdir -p $SAGE_ROOT/local/share/doc/numpy
cp -r build/html $SAGE_ROOT/local/share/doc/numpy
fi

This builds the numpy docs and makes a directory
$SAGE_ROOT/local/share/doc/numpy/html/ that contains the standalone html
documentation for numpy.

Any suggestions or comments?


I've updated a few spkgs to install the documentation if this environment variable is set. Please see this ticket: http://trac.sagemath.org/sage_trac/ticket/10823

Spkgs up there now include:

* numpy: http://sage.math.washington.edu/home/jason/numpy-1.5.1.p0.spkg (depends on #10792) * cython: http://sage.math.washington.edu/home/jason/cython-0.14.1.p0.spkg (depends on #10493) * matplotlib: http://sage.math.washington.edu/home/jason/matplotlib-1.0.1.p0.spkg (depends on #10588) * mpmath: http://sage.math.washington.edu/home/jason/mpmath-0.15.p0.spkg * pari: http://sage.math.washington.edu/home/jason/pari-2.4.3.alpha.p1.spkg
    * gap:  http://sage.math.washington.edu/home/jason/gap-4.4.12.p5.spkg

Thanks,

Jason


--
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

Reply via email to