Transfert the distutil.ext from the org.asm project
This commit is contained in:
@ -83,6 +83,8 @@ def install_requirements(requirementfile='requirements.txt'):
|
||||
log.info(" Installing requirement : %s" % x)
|
||||
pip_install_package(x)
|
||||
install_something=True
|
||||
if x[0:3]=='pip':
|
||||
return True
|
||||
|
||||
return install_something
|
||||
|
||||
@ -134,7 +136,9 @@ def get_package_requirement(package,requirementfile='requirements.txt'):
|
||||
|
||||
def pip_install_package(package,directory=None,upgrade=True):
|
||||
|
||||
log.info('installing %s in directory %s' % (package,str(directory)))
|
||||
if directory is not None:
|
||||
log.info(' installing %s in directory %s' % (package,str(directory)))
|
||||
|
||||
|
||||
if 'http_proxy' in os.environ and 'https_proxy' not in os.environ:
|
||||
os.environ['https_proxy']=os.environ['http_proxy']
|
||||
@ -144,8 +148,8 @@ def pip_install_package(package,directory=None,upgrade=True):
|
||||
if upgrade:
|
||||
args.append('--upgrade')
|
||||
|
||||
if 'http_proxy' in os.environ:
|
||||
args.append('--proxy=%s' % os.environ['http_proxy'])
|
||||
if 'https_proxy' in os.environ:
|
||||
args.append('--proxy=%s' % os.environ['https_proxy'])
|
||||
|
||||
if directory is not None:
|
||||
args.append('--target=%s' % directory)
|
||||
|
Reference in New Issue
Block a user