summaryrefslogtreecommitdiffstats
path: root/Doc/tools/mkpkglist
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2004-05-11 14:37:55 (GMT)
committerFred Drake <fdrake@acm.org>2004-05-11 14:37:55 (GMT)
commit112f8f4f81c9453e86a4ea92bfecfd5d89975598 (patch)
tree454d0975770f1c36c29d5f1062cf737a89e61e24 /Doc/tools/mkpkglist
parent6d340c3de8f3f6926135cab8484cde31420179c2 (diff)
downloadcpython-112f8f4f81c9453e86a4ea92bfecfd5d89975598.zip
cpython-112f8f4f81c9453e86a4ea92bfecfd5d89975598.tar.gz
cpython-112f8f4f81c9453e86a4ea92bfecfd5d89975598.tar.bz2
use tools/getversioninfo to extract the version number from the Python
sources
Diffstat (limited to 'Doc/tools/mkpkglist')
-rwxr-xr-xDoc/tools/mkpkglist15
1 files changed, 4 insertions, 11 deletions
diff --git a/Doc/tools/mkpkglist b/Doc/tools/mkpkglist
index 0dd3916..2c51ee7 100755
--- a/Doc/tools/mkpkglist
+++ b/Doc/tools/mkpkglist
@@ -25,17 +25,10 @@ PKG_TYPES = [
("LaTeX", "latex"),
]
-
-fp = open("Makefile")
-for line in fp:
- line = line.replace('=', ' ', 1)
- parts = line.split()
- if parts[:1] == ["RELEASE"]:
- release = parts[1]
- break
-else:
- print >>sys.stderr, "Could not locate RELEASE in Makefile."
- sys.exit(1)
+getversioninfo = os.path.join(os.path.dirname(__file__), "getversioninfo")
+fp = os.popen('"%s" "%s"' % (sys.executable, getversioninfo), "r")
+release = fp.readline().strip()
+fp.close()
print '''\
<table border="1" cellpadding="3" align="center">