mirror of
https://github.com/python/cpython
synced 2024-10-04 16:04:52 +00:00
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.
This commit is contained in:
parent
d39683396b
commit
6b1793ff88
|
@ -639,9 +639,8 @@ def visit(self, object):
|
|||
|
||||
def main(srcfile):
|
||||
argv0 = sys.argv[0]
|
||||
index = argv0.find('/')
|
||||
if index > 0:
|
||||
argv0 = argv0[index + 1:]
|
||||
components = argv0.split(os.sep)
|
||||
argv0 = os.sep.join(components[-2:])
|
||||
auto_gen_msg = '/* File automatically generated by %s */\n' % argv0
|
||||
mod = asdl.parse(srcfile)
|
||||
if not asdl.check(mod):
|
||||
|
|
Loading…
Reference in a new issue