From 61e33da844ab429b1ceb09b98bfafee5c0270f54 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Tue, 30 Jun 2015 11:14:47 -0500 Subject: [PATCH] module installer --- gluon/module_installer.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 gluon/module_installer.py diff --git a/gluon/module_installer.py b/gluon/module_installer.py new file mode 100644 index 00000000..068421b8 --- /dev/null +++ b/gluon/module_installer.py @@ -0,0 +1,10 @@ +from setuptools.command import easy_install +import pkg_resources + +def install(module_names): + for name in module_names: + try: + pkg_resources.require(name) + except pkg_resources.DistributionNotFound: + easy_install.main( ["-U",name] ) + pkg_resources.require(name)