]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Anthony started backporting the changes needed to remove version numbers
authorFred Drake <fdrake@acm.org>
Fri, 5 Dec 2003 16:44:01 +0000 (16:44 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 5 Dec 2003 16:44:01 +0000 (16:44 +0000)
from the Doc/ tree; this finishes the job.  Version information is now
extracted from Python's Include/patchlevel.h.

Doc/Makefile
Doc/Makefile.deps
Doc/commontex/boilerplate.tex
Doc/tools/mksourcepkg

index 3e9d8ebb6e406b525e387cd16ec4026368a1629e..38c816317aee589d1fab7dd489f7d0cf3cfd141a 100644 (file)
@@ -64,9 +64,14 @@ PAPER=letter
 INFODIR=       info
 TOOLSDIR=      tools
 
-# This is the *documentation* release, and is used to construct the file
-# names of the downloadable tarballs.
-RELEASE=2.3.3c1
+# This is the *documentation* release, and is used to construct the
+# file names of the downloadable tarballs.  It is initialized by the
+# getversioninfo script to ensure that the right version number is
+# used; the script will also write commontex/patchlevel.tex if that
+# doesn't exist or needs to be changed.  Documents which depend on the
+# version number should use \input{patchlevel} and include
+# commontex/patchlevel.tex in their dependencies.
+RELEASE=$(shell $(PYTHON) tools/getversioninfo)
 
 PYTHON=           python
 DVIPS=    dvips -N0 -t $(PAPER)
index 343dd168f61e9a4d2124051a4c484cbb613b112c..147b1107c15d96819f3a750235729a8e4a42f6db 100644 (file)
@@ -7,6 +7,7 @@ INDEXSTYLES=texinputs/python.ist
 
 COMMONTEX=commontex/copyright.tex \
        commontex/license.tex \
+       commontex/patchlevel.tex \
        commontex/boilerplate.tex
 
 MANSTYLES= texinputs/fncychap.sty \
@@ -68,7 +69,7 @@ EXTFILES= ext/ext.tex $(MANSTYLES) $(INDEXSTYLES) $(COMMONTEX) \
        commontex/typestruct.h \
        commontex/reportingbugs.tex
 
-TUTFILES= tut/tut.tex $(MANSTYLES) $(COMMONTEX)
+TUTFILES= tut/tut.tex tut/glossary.tex $(MANSTYLES) $(COMMONTEX)
 
 # LaTeX source files for the Python Reference Manual
 REFFILES= $(MANSTYLES) $(INDEXSTYLES) $(COMMONTEX) \
index e63e930b919654eaa909f3926cb4dea41e8e3836..cab70c09668fcecba8ada1828aa7a7ab98ed343f 100644 (file)
@@ -6,6 +6,4 @@
 }
 
 \date{\today}                  % XXX update before final release!
-\release{2.3.3}                        % software release, not documentation
-\setreleaseinfo{c1}            % empty for final release
-\setshortversion{2.3}          % major.minor only for software
+\input{patchlevel}             % include Python version information
index 54b46f9f63ae48205c8370d615b21678ab0e277c..cad2b442b0518f1a74a93c975994f47eab49a21b 100755 (executable)
@@ -26,6 +26,14 @@ import tempfile
 
 import cvsinfo
 
+try:
+    __file__
+except NameError:
+    __file__ = sys.argv[0]
+
+tools = os.path.dirname(os.path.abspath(__file__))
+Doc = os.path.dirname(tools)
+patchlevel_tex = os.path.join(Doc, "commontex", "patchlevel.tex")
 
 quiet = 0
 rx = re.compile(r":ext:(?:[a-zA-Z0-9]+@)?cvs\.([a-zA-Z0-9]+).sourceforge.net:"
@@ -105,8 +113,19 @@ def main():
           # remove CVS directories
           for p in ('*/CVS', '*/*/CVS', '*/*/*/CVS'):
                map(shutil.rmtree, glob.glob(p))
-          for f in ('.cvsignore', '*/.cvsignore'):
-               map(os.unlink, glob.glob(f))
+     for f in ('.cvsignore', '*/.cvsignore'):
+          map(os.unlink, glob.glob(f))
+
+     # Copy in the version informtation, if we're not just going to
+     # rip it back out:
+     if not tools:
+          if not os.path.exists(patchlevel_tex):
+               run(os.path.join(here, "getversioninfo"))
+          dest = os.path.join("Python-Docs-" + release, "commontex",
+                              "patchlevel.tex")
+          shutil.copyfile(patchlevel_tex, dest)
+
+     # Copy in the license file:
      LICENSE = os.path.normpath(
           os.path.join(mydir, os.pardir, os.pardir, "LICENSE"))
      shutil.copyfile(LICENSE, "LICENSE")
@@ -114,7 +133,7 @@ def main():
           archive = "doctools-" + release
           # we don't want the actual documents in this case:
           for d in ("api", "dist", "doc", "ext", "inst",
-                    "lib", "mac", "ref", "tut"):
+                    "lib", "mac", "ref", "tut", "commontex"):
                shutil.rmtree(os.path.join(pkgdir, d))
      else:
           archive = "latex-" + release