comparison mx/commands.py @ 11534:2d759e68c8ca

pylint only checks versioned python sources
author Doug Simon <doug.simon@oracle.com>
date Thu, 05 Sep 2013 20:23:20 +0200
parents be9e54fbb699
children 3676540f71cf
comparison
equal deleted inserted replaced
11533:86830ed062be 11534:2d759e68c8ca
465 465
466 466
467 env = os.environ.copy() 467 env = os.environ.copy()
468 env['PYTHONPATH'] = dirname(mx.__file__) 468 env['PYTHONPATH'] = dirname(mx.__file__)
469 469
470 for root, _, filenames in os.walk(_graal_home): 470 versioned = subprocess.check_output(['hg', 'locate', '-f'], stderr=subprocess.STDOUT).split(os.linesep)
471 for f in filenames: 471 for f in versioned:
472 if f.endswith('.py'): 472 if f.endswith('.py'):
473 pyfile = join(_graal_home, root, f) 473 pyfile = f
474 mx.log('Running pylint on ' + pyfile + '...') 474 mx.log('Running pylint on ' + pyfile + '...')
475 mx.run(['pylint', '--reports=n', '--rcfile=' + rcfile, pyfile], env=env) 475 mx.run(['pylint', '--reports=n', '--rcfile=' + rcfile, pyfile], env=env)
476 476
477 def jdkhome(args, vm=None): 477 def jdkhome(args, vm=None):
478 """print the JDK directory selected for the 'vm' command""" 478 """print the JDK directory selected for the 'vm' command"""
479 479
480 build = _vmbuild if _vmSourcesAvailable else 'product' 480 build = _vmbuild if _vmSourcesAvailable else 'product'