Commits

Anonymous committed 51c5759

get version written to .py file;
can now import sagetex and do `sagetex.version' to check what version
Sage is using.

Comments (0)

Files changed (3)

 % see
 % \href{http://trac.sagemath.org/sage_trac/ticket/2861#comment:5}{ticket
 % \#2861}.
-% \changes{v2.0.2}{2008/04/21}{Make sure sys.exit sees a Python integer.}
+% \changes{v2.0.2}{2008/04/21}{Make sure sys.exit sees a Python integer}
 % \end{macro}
 % 
 % \begin{macro}{endofdoc}

sagetexpackage.dtx

 %</driver>
 %<latex>\NeedsTeXFormat{LaTeX2e}
 %<latex>\ProvidesPackage{sagetex}
-%<*latex>
+%<python>version = """
+%<*latex|python>
   [2009/05/12 v2.1 embedding Sage into LaTeX documents]
-%</latex>
+%</latex|python>
+%<python>"""
 %<*driver>
 \documentclass{ltxdoc}
 \usepackage{sagetex}
 %
 % \changes{v1.0}{2008/03/03}{Initial version}
 % \changes{v1.1}{2008/03/05}{Wrapped user-provided Sage code in
-% try/except clauses; plotting now has optional format argument.}
+% try/except clauses; plotting now has optional format argument}
 % \changes{v1.2}{2008/03/07}{Imagemagick option; better documentation}
 % \changes{v1.3.1}{2008/03/10}{Internal variables renamed; fixed typos}
 % \changes{v1.4}{2008/03/11}{MD5 fix, percent sign macro, CTAN upload}
 % \changes{v2.0}{2008/12/16}{External Python scripts for parsing
 % SageTeX-ified documents, tons of documentation improvements,
 % sagetex.py refactored, include in Sage as spkg}
-% \changes{v2.0}{2009/01/09}{Miscellaneous fixes, final 2.0 version.}
-% \changes{v2.1}{2009/05/12}{Add pausing support.}
+% \changes{v2.0}{2009/01/09}{Miscellaneous fixes, final 2.0 version}
+% \changes{v2.1}{2009/05/12}{Add pausing support}
+% \changes{v2.1}{2009/05/12}{Get version written to .py file}
 %
 % \GetFileInfo{sagetex.sty}
 %
 % \section{Installation}
 % \label{sec:installation}
 % \changes{v2.0}{2009/01/14}{Fixed up installation section, final
-% \emph{final} 2.0.}
+% \emph{final} 2.0}
 %
 % To install \ST, you need to do two things: make \ST known to Sage, and
 % to \LTX. There are two basic methods to do those two things.

sagetexpackage.ins

   \defaultpostamble^^J%
   """}
 
-\generate{\file{sagetex.py}{\from{py-and-sty.dtx}{python}}}
+\generate{\file{sagetex.py}{\from{sagetexpackage.dtx}{python}
+                            \from{py-and-sty.dtx}{python}}}
 
 \generate{\file{sagetexparse.py}{\from{scripts.dtx}{parsermod}}}