[Python-checkins] commit of r41644 - in python/trunk: Include/Python-ast.h Parser/asdl_c.py Python/Python-ast.c
neal.norwitz
python-checkins at python.org
Sun Dec 11 22:18:23 CET 2005
Author: neal.norwitz
Date: Sun Dec 11 22:18:22 2005
New Revision: 41644
Modified:
python/trunk/Include/Python-ast.h
python/trunk/Parser/asdl_c.py
python/trunk/Python/Python-ast.c
Log:
SF #1373150, diffs in working copy after a build
Strip off leading dots and slash so the generated files are the same regardless
of whether you configure in the checkout directory or build.
If anyone configures in a different directory, we might want a cleaner
approach using os.path.*(). Hopefully this is good enough.
Modified: python/trunk/Include/Python-ast.h
==============================================================================
--- python/trunk/Include/Python-ast.h (original)
+++ python/trunk/Include/Python-ast.h Sun Dec 11 22:18:22 2005
@@ -1,4 +1,4 @@
-/* File automatically generated by ./Parser/asdl_c.py */
+/* File automatically generated by Parser/asdl_c.py */
#include "asdl.h"
Modified: python/trunk/Parser/asdl_c.py
==============================================================================
--- python/trunk/Parser/asdl_c.py (original)
+++ python/trunk/Parser/asdl_c.py Sun Dec 11 22:18:22 2005
@@ -638,7 +638,11 @@
v.emit("", 0)
def main(srcfile):
- auto_gen_msg = '/* File automatically generated by %s */\n' % sys.argv[0]
+ argv0 = sys.argv[0]
+ index = argv0.find('/')
+ if index > 0:
+ argv0 = argv0[index + 1:]
+ auto_gen_msg = '/* File automatically generated by %s */\n' % argv0
mod = asdl.parse(srcfile)
if not asdl.check(mod):
sys.exit(1)
Modified: python/trunk/Python/Python-ast.c
==============================================================================
--- python/trunk/Python/Python-ast.c (original)
+++ python/trunk/Python/Python-ast.c Sun Dec 11 22:18:22 2005
@@ -1,4 +1,4 @@
-/* File automatically generated by ./Parser/asdl_c.py */
+/* File automatically generated by Parser/asdl_c.py */
#include "Python.h"
#include "Python-ast.h"
More information about the Python-checkins
mailing list