Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 112f8f4

Browse files
committed
use tools/getversioninfo to extract the version number from the Python
sources
1 parent 6d340c3 commit 112f8f4

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

Doc/tools/mkpkglist

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,10 @@ PKG_TYPES = [
2525
("LaTeX", "latex"),
2626
]
2727

28-
29-
fp = open("Makefile")
30-
for line in fp:
31-
line = line.replace('=', ' ', 1)
32-
parts = line.split()
33-
if parts[:1] == ["RELEASE"]:
34-
release = parts[1]
35-
break
36-
else:
37-
print >>sys.stderr, "Could not locate RELEASE in Makefile."
38-
sys.exit(1)
28+
getversioninfo = os.path.join(os.path.dirname(__file__), "getversioninfo")
29+
fp = os.popen('"%s" "%s"' % (sys.executable, getversioninfo), "r")
30+
release = fp.readline().strip()
31+
fp.close()
3932

4033
print '''\
4134
<table border="1" cellpadding="3" align="center">

0 commit comments

Comments
 (0)