module installer

This commit is contained in:
mdipierro
2015-06-30 11:14:47 -05:00
parent 7543c54bdb
commit 61e33da844
+10
View File
@@ -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)