diff options
author | Benjamin Peterson <benjamin@python.org> | 2011-07-22 15:39:12 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2011-07-22 15:39:12 (GMT) |
commit | efad2449fc14501fd4e98cb120ac0c19f82d4e78 (patch) | |
tree | 9e3eb18c4fb5f0ea540b9c3b9d59b91900efd786 /Parser | |
parent | 2193d2b72bc942a0c0b489a9c2759a6aefbeecdf (diff) | |
download | cpython-efad2449fc14501fd4e98cb120ac0c19f82d4e78.zip cpython-efad2449fc14501fd4e98cb120ac0c19f82d4e78.tar.gz cpython-efad2449fc14501fd4e98cb120ac0c19f82d4e78.tar.bz2 |
hardcode the old svn __version__
Diffstat (limited to 'Parser')
-rwxr-xr-x | Parser/asdl_c.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py index 729ded8..6598375 100755 --- a/Parser/asdl_c.py +++ b/Parser/asdl_c.py @@ -899,9 +899,6 @@ static int add_ast_fields(void) self.emit("if (!%s_singleton) return 0;" % cons.name, 1) -def parse_version(mod): - return mod.version.value[12:-3] - class ASTModuleVisitor(PickleVisitor): def visitModule(self, mod): @@ -921,7 +918,7 @@ class ASTModuleVisitor(PickleVisitor): self.emit("return NULL;", 2) # Value of version: "$Revision$" self.emit('if (PyModule_AddStringConstant(m, "__version__", "%s") < 0)' - % parse_version(mod), 1) + % mod.version, 1) self.emit("return NULL;", 2) for dfn in mod.dfns: self.visit(dfn) @@ -1160,6 +1157,7 @@ def main(srcfile): argv0 = os.sep.join(components[-2:]) auto_gen_msg = common_msg % argv0 mod = asdl.parse(srcfile) + mod.version = "82163" if not asdl.check(mod): sys.exit(1) if INC_DIR: @@ -1181,7 +1179,7 @@ def main(srcfile): p = os.path.join(SRC_DIR, str(mod.name) + "-ast.c") f = open(p, "w") f.write(auto_gen_msg) - f.write(c_file_msg % parse_version(mod)) + f.write(c_file_msg % mod.version) f.write('#include "Python.h"\n') f.write('#include "%s-ast.h"\n' % mod.name) f.write('\n') |