From 40056c69d845830d73cccc0973436419d4e743cc Mon Sep 17 00:00:00 2001 From: jhunpingco Date: Wed, 15 Aug 2018 09:12:51 -0700 Subject: [PATCH] fixed for newer pip version --- src/lambda_deploy/lambda_deploy.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lambda_deploy/lambda_deploy.py b/src/lambda_deploy/lambda_deploy.py index 9594204..8f0dd9f 100644 --- a/src/lambda_deploy/lambda_deploy.py +++ b/src/lambda_deploy/lambda_deploy.py @@ -12,6 +12,9 @@ import zipfile import logging import optparse +import subprocess + + from .utils import TemporaryDirectory from .version import __version__ @@ -134,9 +137,8 @@ def package(self): '-t', temp_dir ] - # Do pip install to temporary dir - if pip.main(pip_args) == 0: + if subprocess.check_call([sys.executable,'-m','pip']+pip_args) == 0: self.add_directory_to_zip(temp_dir, zf) else: if sys.platform == 'darwin':