Skip to content
Snippets Groups Projects
Commit fa5a6b11 authored by jkerdreu's avatar jkerdreu
Browse files

Lint ..



git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@3052 b32b6428-25c9-4566-ad07-03861ab6144f
parent edd77b6f
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,7 @@ import sys ...@@ -9,7 +9,7 @@ import sys
PYTHON = sys.executable PYTHON = sys.executable
BASE=['./libs/lib','./libs/monitor','./libs/schemas'] BASE = ['./libs/lib', './libs/monitor', './libs/schemas']
BLACKLIST = ['lm_sensors', BLACKLIST = ['lm_sensors',
'gtk-notify', 'gtk-notify',
'conky', 'conky',
...@@ -17,6 +17,7 @@ BLACKLIST = ['lm_sensors', ...@@ -17,6 +17,7 @@ BLACKLIST = ['lm_sensors',
'SensFloor', 'SensFloor',
'fuse'] 'fuse']
def title(msg): def title(msg):
print("="*78) print("="*78)
print("Running %s" % msg) print("Running %s" % msg)
...@@ -27,29 +28,34 @@ def required(): ...@@ -27,29 +28,34 @@ def required():
os.system('pip install --upgrade pip') os.system('pip install --upgrade pip')
os.system('pip install wheel') os.system('pip install wheel')
def setup_develop(path): def setup_develop(path):
title(path) title(path)
os.system('cd %s && pip install -e .' % path) os.system('cd %s && pip install -e .' % path)
os.system('cd %s && %s setup.py develop' % (path,PYTHON)) os.system('cd %s && %s setup.py develop' % (path, PYTHON))
def setup_install(path): def setup_install(path):
title(path) title(path)
os.system('cd %s && pip install -e .' % path) os.system('cd %s && pip install -e .' % path)
os.system('cd %s && %s setup.py install' % (path,PYTHON)) os.system('cd %s && %s setup.py install' % (path, PYTHON))
def search_setup(): def search_setup():
l=glob.glob('./**/setup.py',recursive=True) l = glob.glob('./**/setup.py', recursive=True)
result = [] result = []
for k in l: for k in l:
path='/'.join(k.split('/')[0:-1]) path = '/'.join(k.split('/')[0:-1])
if path in BASE:continue if path in BASE:
continue
last = path.split('/')[-1] last = path.split('/')[-1]
if last in BLACKLIST:continue if last in BLACKLIST:
continue
result.append(path) result.append(path)
return result return result
def run(): def run():
required() required()
for p in BASE: for p in BASE:
...@@ -57,7 +63,6 @@ def run(): ...@@ -57,7 +63,6 @@ def run():
for p in search_setup(): for p in search_setup():
setup_develop(p) setup_develop(p)
if __name__=='__main__':
run() if __name__ == '__main__':
run()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment