From: Fred Drake Date: Fri, 5 Dec 2003 16:44:01 +0000 (+0000) Subject: Anthony started backporting the changes needed to remove version numbers X-Git-Tag: v2.3.3~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=303e5bb14d5edf522b6c4062560161f9d127dd49;p=thirdparty%2FPython%2Fcpython.git Anthony started backporting the changes needed to remove version numbers from the Doc/ tree; this finishes the job. Version information is now extracted from Python's Include/patchlevel.h. --- diff --git a/Doc/Makefile b/Doc/Makefile index 3e9d8ebb6e40..38c816317aee 100644 --- a/Doc/Makefile +++ b/Doc/Makefile @@ -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) diff --git a/Doc/Makefile.deps b/Doc/Makefile.deps index 343dd168f61e..147b1107c15d 100644 --- a/Doc/Makefile.deps +++ b/Doc/Makefile.deps @@ -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) \ diff --git a/Doc/commontex/boilerplate.tex b/Doc/commontex/boilerplate.tex index e63e930b9196..cab70c09668f 100644 --- a/Doc/commontex/boilerplate.tex +++ b/Doc/commontex/boilerplate.tex @@ -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 diff --git a/Doc/tools/mksourcepkg b/Doc/tools/mksourcepkg index 54b46f9f63ae..cad2b442b051 100755 --- a/Doc/tools/mksourcepkg +++ b/Doc/tools/mksourcepkg @@ -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