Source

sage-mode / spkg-install

#!/bin/sh

CUR=`pwd`

# Build and install Python support files
cd src/
python setup.py build

if [ $? -ne 0 ]; then
    echo "Failure to build sage-mode Python support files"
    exit 1
fi

python setup.py install

if [ $? -ne 0 ]; then
    echo "Failure to install sage-mode Python support files"
    exit 1
fi

# Copy emacs lisp to SAGE_DATA, and print helpful instructions
cd "$CUR"
rm -rf $SAGE_DATA/emacs
cp -r emacs $SAGE_DATA/emacs

cat <<EOF


A basic install might include the following Emacs Lisp in your .emacs:

(add-to-list 'load-path (expand-file-name "$SAGE_DATA/emacs"))
(require 'sage "sage")
(setq sage-command "$SAGE_ROOT/sage")

;; If you want sage-view to typeset all your output and have plot()
;; commands inline, uncomment the following line and configure sage-view:
;; (require 'sage-view "sage-view")
;; (add-hook 'sage-startup-hook 'sage-view)
;; You can use commands like
;; (add-hook 'sage-startup-hook 'sage-view
;; 'sage-view-disable-inline-output 'sage-view-disable-inline-plots)
;; to have some combination of features.  In future, the customize interface
;; will make this simpler... hint, hint!


EOF