Commit 6b1793ff authored by Armin Rigo's avatar Armin Rigo

When regenerating files like Python-ast.h, take care that the generated

comment based on 'sys.args[0]' does not depend on the path.  For Python
builds from a remote directory ("/path/to/configure; make") the previous
logic used to include the "/path/to" portion in Python-ast.h.  Then svn
would consider this file to be locally modified.
parent d3968339
...@@ -639,9 +639,8 @@ class ChainOfVisitors: ...@@ -639,9 +639,8 @@ class ChainOfVisitors:
def main(srcfile): def main(srcfile):
argv0 = sys.argv[0] argv0 = sys.argv[0]
index = argv0.find('/') components = argv0.split(os.sep)
if index > 0: argv0 = os.sep.join(components[-2:])
argv0 = argv0[index + 1:]
auto_gen_msg = '/* File automatically generated by %s */\n' % argv0 auto_gen_msg = '/* File automatically generated by %s */\n' % argv0
mod = asdl.parse(srcfile) mod = asdl.parse(srcfile)
if not asdl.check(mod): if not asdl.check(mod):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment