diff --git a/Doc/tools/mkpkglist b/Doc/tools/mkpkglist index 0dd39162427..2c51ee75e88 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 '''\