1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
#!/usr/bin/env python
import os
import sys
from os.path import dirname, join as joinpath, abspath
def main():
extra = abspath(dirname(__file__))
root = abspath(joinpath(extra, '..'))
envpath = os.environ.get('PYTHONPATH', None)
path = [envpath] if envpath else []
path.append(extra)
#bumps = abspath(joinpath(root, "..", "bumps"))
#periodictable = abspath(joinpath(root, "..", "periodictable"))
#sasview = abspath(joinpath(root, "..", "sasview", "src"))
#path.extend((bumps, periodictable, sasview))
os.environ['PYTHONPATH'] = ':'.join(path)
# Run the lint command
cmd = "pylint --rcfile extra/pylint.rc -f parseable sasmodels"
os.chdir(root)
status = os.system(cmd)
sys.exit(status)
if __name__ == "__main__":
main()
|