+# the subdir stuff makes the tarball have the directory correct
+srcs=../sagetex/example.tex ../sagetex/README ../sagetex/sagetexpackage.dtx ../sagetex/sagetexpackage.ins
- rm -fr sage-plots-for-* E2.sobj *.pyc sagetex.tar.gz sagetex.py sagetex.pyc sagetex.sty makestatic.py sagetexparse.py extractsagecode.py
+ rm -fr sage-plots-for-* E2.sobj *.pyc sagetex.tar.gz sagetex.py sagetex.pyc sagetex.sty makestatic.py sagetexparse.py extractsagecode.py dist MANIFEST
-e 's|directory with sagetex.py|$(dest)|'\
-e '50,55 s/\\fi//' sagetex.sty > $(dest)/sagetex.sty
+# make a tarball suitable for CTAN uploads, or for someone who knows how
@echo Did you turn off Imagemagick in example.tex?
- @tar zcf sagetex.tar.gz ../sagetex/example.pdf ../sagetex/example.tex ../sagetex/README ../sagetex/sagetexpackage.dtx ../sagetex/sagetexpackage.ins ../sagetex/sagetexpackage.pdf
+ tar zcf sagetex.tar.gz $(srcs) ../sagetex/example.pdf ../sagetex/sagetexpackage.pdf
+ gunzip dist/sagetex-$(ver).tar.gz
+ bzip2 dist/sagetex-$(ver).tar
+ cp dist/sagetex-$(ver).tar.bz2 dist/sagetex-$(ver).spkg
+This is the SageTeX package. It allows you to embed code, results of
+computations, and plots from the Sage mathematics software suite
+(http://sagemath.org) into LaTeX documents.
+If you're reading this, you already have Sage, so if you also have TeX
+installed, you are ready to use SageTeX!
+To install SageTeX, you need only make the necessary files available to
+TeX; Sage already has the necessary bits built in. The easiest thing to
+do is copy this directory to a texmf directory in your home directory;
+something like this for Linux/Unix users:
+ cp -r $SAGE_ROOT/local/share/texmf/ $HOME/texmf/
+For OS X users with TeXLive:
+ cp -r $SAGE_ROOT/local/share/texmf/ $HOME/Library/texmf/
+I don't use Windows, so I don't know what MiKTeX users should do. Let me
+know and I'll add it here!
+After you've copied over the necessary files, you'll need to update
+TeX's database so that it can find them. Run "texhash $HOME/texmf"
+(replace the texmf directory as appropriate) to do this.
+Now check out the PDF files in this directory for more information on
+using SageTeX. If you have problems or suggestions see the sage-support
-* should I switch over entirely to the Sweave strategy, where we parse a
- file into LaTeX format?
-* hyperlinks in documentation between LaTeX and Python functions that
* What about graphs and TikZ?
* desagetexparser -- leave Sage commands in as comments? document usage!
* UPDATE v2.0 date in .dtx file when it's ready!
-* Jason's suggestions from September
+* finish spkg-ification; don't include CTAN readme, make up a
+from distutils.core import setup
+ description='Embed Sage code and plots into LaTeX',
+ long_description="""The SageTeX package allows you to embed code,
+ results of computations, and plots from the Sage mathematics
+ software suite (http://sagemath.org) into LaTeX documents.""",
+ data_files = [('share/texmf/tex/generic/sagetex',
+if [ "$SAGE_LOCAL" = "" ]; then
+ echo "SAGE_LOCAL undefined ... exiting";
+ echo "Maybe run 'sage -sh'?"
+ echo "Error installing SageTeX."