mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-23 04:43:50 +01:00
qp_install uninstall
This commit is contained in:
parent
b0515ac93e
commit
9d3d9f45b9
@ -1,10 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Usage: qp_install_module.py list (--installed|--avalaible-local|--avalaible-remote)
|
||||
qp_install_module.py install <name>...
|
||||
Usage:
|
||||
qp_install_module.py create -n <name> [<children_module>...]
|
||||
qp_install_module.py download -n <name> [<path_folder>...]
|
||||
qp_install_module.py install <name>...
|
||||
qp_install_module.py list (--installed|--avalaible-local|--avalaible-remote)
|
||||
qp_install_module.py uninstall <name>...
|
||||
|
||||
|
||||
Options:
|
||||
@ -150,3 +152,22 @@ if __name__ == '__main__':
|
||||
raise
|
||||
print "Done"
|
||||
print "You can now compile as usual"
|
||||
|
||||
elif arguments["uninstall"]:
|
||||
|
||||
d_local = get_dict_child([qp_root_src])
|
||||
l_name = arguments["<name>"]
|
||||
|
||||
l_failed = [ name for name in l_name if name not in d_local ]
|
||||
if l_failed:
|
||||
print "Modules not installed:"
|
||||
for name in sorted(l_failed):
|
||||
print "* %s"%name
|
||||
sys.exit(1)
|
||||
else:
|
||||
def unlink(x):
|
||||
try:
|
||||
os.unlink(os.path.join(qp_root_src,x))
|
||||
except OSError:
|
||||
print "%s is a core module which can not be renmoved"%x
|
||||
map(unlink,l_name)
|
||||
|
Loading…
Reference in New Issue
Block a user