Skip to content

Commit 4f215c9

Browse files
author
Karthic Hariharan
committed
Issue: nficano#83 Click commands should use correct keyword args for requirements
1 parent 1a089de commit 4f215c9

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

aws_lambda/aws_lambda.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def cleanup_old_versions(src, keep_last_versions, config_file='config.yaml'):
7979

8080

8181
def deploy(
82-
src, requirements=False, local_package=None,
82+
src, use_requirements=False, local_package=None,
8383
config_file='config.yaml',
8484
):
8585
"""Deploys a new function to AWS Lambda.
@@ -101,7 +101,7 @@ def deploy(
101101
# directory.
102102
path_to_zip_file = build(
103103
src, config_file=config_file,
104-
requirements=requirements,
104+
use_requirements=use_requirements,
105105
local_package=local_package,
106106
)
107107

@@ -132,7 +132,7 @@ def deploy_s3(
132132
# Zip the contents of this folder into a single file and output to the dist
133133
# directory.
134134
path_to_zip_file = build(
135-
src, config_file=config_file, requirements=requirements,
135+
src, config_file=config_file, use_requirements=requirements,
136136
local_package=local_package,
137137
)
138138

@@ -145,7 +145,7 @@ def deploy_s3(
145145

146146

147147
def upload(
148-
src, requirements=False, local_package=None,
148+
src, use_requirements=False, local_package=None,
149149
config_file='config.yaml',
150150
):
151151
"""Uploads a new function to AWS S3.
@@ -166,7 +166,7 @@ def upload(
166166
# Zip the contents of this folder into a single file and output to the dist
167167
# directory.
168168
path_to_zip_file = build(
169-
src, config_file=config_file, requirements=requirements,
169+
src, config_file=config_file, use_requirements=use_requirements,
170170
local_package=local_package,
171171
)
172172

@@ -248,7 +248,7 @@ def init(src, minimal=False):
248248

249249

250250
def build(
251-
src, requirements=False, local_package=None, config_file='config.yaml',
251+
src, use_requirements=False, local_package=None, config_file='config.yaml',
252252
):
253253
"""Builds the file bundle.
254254
@@ -277,7 +277,7 @@ def build(
277277
path_to_temp = mkdtemp(prefix='aws-lambda')
278278
pip_install_to_target(
279279
path_to_temp,
280-
requirements=requirements,
280+
use_requirements=use_requirements,
281281
local_package=local_package,
282282
)
283283

@@ -396,13 +396,13 @@ def _filter_blacklist(package):
396396
pip.main(['install', package, '-t', path, '--ignore-installed'])
397397

398398

399-
def pip_install_to_target(path, requirements=False, local_package=None):
399+
def pip_install_to_target(path, use_requirements=False, local_package=None):
400400
"""For a given active virtualenv, gather all installed pip packages then
401401
copy (re-install) them to the path provided.
402402
403403
:param str path:
404404
Path to copy installed pip packages to.
405-
:param bool requirements:
405+
:param bool use_requirements:
406406
If set, only the packages in the requirements.txt file are installed.
407407
The requirements.txt file needs to be in the same directory as the
408408
project which shall be deployed.
@@ -413,7 +413,7 @@ def pip_install_to_target(path, requirements=False, local_package=None):
413413
well (and/or is not available on PyPi)
414414
"""
415415
packages = []
416-
if not requirements:
416+
if not use_requirements:
417417
print('Gathering pip packages')
418418
packages.extend(pip.operations.freeze.freeze())
419419
else:

0 commit comments

Comments
 (0)