[pypy-commit] pypy default: Also accept a full directory name, for easier tab-completion.
arigo
noreply at buildbot.pypy.org
Wed Dec 7 18:18:19 CET 2011
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r50275:aeb5a474cce9
Date: 2011-12-07 18:17 +0100
http://bitbucket.org/pypy/pypy/changeset/aeb5a474cce9/
Log: Also accept a full directory name, for easier tab-completion.
diff --git a/pypy/bin/checkmodule.py b/pypy/bin/checkmodule.py
--- a/pypy/bin/checkmodule.py
+++ b/pypy/bin/checkmodule.py
@@ -7,7 +7,7 @@
modules compiles without doing a full translation.
"""
import autopath
-import sys
+import sys, os
from pypy.objspace.fake.checkmodule import checkmodule
@@ -23,6 +23,13 @@
print >> sys.stderr, "Bad command line"
print >> sys.stderr, __doc__
sys.exit(1)
+ if os.path.sep in modname:
+ if os.path.basename(modname) == '':
+ modname = os.path.dirname(modname)
+ if os.path.basename(os.path.dirname(modname)) != 'module':
+ print >> sys.stderr, "Must give '../module/xxx', or just 'xxx'."
+ sys.exit(1)
+ modname = os.path.basename(modname)
try:
checkmodule(modname)
except Exception, e:
More information about the pypy-commit
mailing list