Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit 529dfec

Browse files
committed
Default noDeploy to an empty list
1 parent 2e81175 commit 529dfec

File tree

4 files changed

+15
-31
lines changed

4 files changed

+15
-31
lines changed

appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
version: '{build}'
22
init:
3+
- cmd: python -m pip install -U pip
34
- cmd: pip install pipenv
45
- cmd: pip install poetry==1.0.0a2
56
- ps: npm i -g serverless

index.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,7 @@ class ServerlessPythonRequirements {
5353
cacheLocation: false,
5454
staticCacheMaxVersions: 0,
5555
pipCmdExtraArgs: [],
56-
noDeploy: [
57-
'boto3',
58-
'botocore',
59-
'docutils',
60-
'jmespath',
61-
'python-dateutil',
62-
's3transfer',
63-
'six',
64-
'pip',
65-
'setuptools'
66-
],
56+
noDeploy: [],
6757
vendor: ''
6858
},
6959
(this.serverless.service.custom &&

test.js

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ test('default pythonBin can package flask with default options', t => {
128128
sls(['package']);
129129
const zipfiles = listZipFiles('.serverless/sls-py-req-test.zip');
130130
t.true(zipfiles.includes(`flask${sep}__init__.py`), 'flask is packaged');
131-
t.false(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is NOT packaged');
131+
t.true(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is packaged');
132132
t.end();
133133
});
134134

@@ -139,7 +139,7 @@ test('py3.6 can package flask with default options', t => {
139139
sls([`--pythonBin=${getPythonBin(3)}`, 'package']);
140140
const zipfiles = listZipFiles('.serverless/sls-py-req-test.zip');
141141
t.true(zipfiles.includes(`flask${sep}__init__.py`), 'flask is packaged');
142-
t.false(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is NOT packaged');
142+
t.true(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is packaged');
143143
t.end();
144144
});
145145

@@ -248,9 +248,9 @@ test(
248248

249249
const zipfiles = listZipFiles('.serverless/sls-py-req-test.zip');
250250
t.true(zipfiles.includes(`flask${sep}__init__.py`), 'flask is packaged');
251-
t.false(
251+
t.true(
252252
zipfiles.includes(`boto3${sep}__init__.py`),
253-
'boto3 is NOT packaged'
253+
'boto3 is packaged'
254254
);
255255
t.end();
256256
},
@@ -379,7 +379,7 @@ test('py2.7 can package flask with default options', t => {
379379
sls([`--pythonBin=${getPythonBin(2)}`, 'package']);
380380
const zipfiles = listZipFiles('.serverless/sls-py-req-test.zip');
381381
t.true(zipfiles.includes(`flask${sep}__init__.py`), 'flask is packaged');
382-
t.false(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is NOT packaged');
382+
t.true(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is packaged');
383383
t.end();
384384
});
385385

@@ -556,10 +556,7 @@ test(
556556

557557
const zipfiles = listZipFiles('.serverless/sls-py-req-test.zip');
558558
t.true(zipfiles.includes(`flask${sep}__init__.py`), 'flask is packaged');
559-
t.false(
560-
zipfiles.includes(`boto3${sep}__init__.py`),
561-
'boto3 is NOT packaged'
562-
);
559+
t.true(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is packaged');
563560
t.end();
564561
},
565562
{ skip: !canUseDocker() }
@@ -631,7 +628,7 @@ test('pipenv py3.6 can package flask with default options', t => {
631628
sls(['package']);
632629
const zipfiles = listZipFiles('.serverless/sls-py-req-test.zip');
633630
t.true(zipfiles.includes(`flask${sep}__init__.py`), 'flask is packaged');
634-
t.false(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is NOT packaged');
631+
t.true(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is packaged');
635632
t.end();
636633
});
637634

@@ -838,11 +835,11 @@ test('py3.6 can package lambda-decorators using vendor option', t => {
838835
sls([`--vendor=./vendor`, 'package']);
839836
const zipfiles = listZipFiles('.serverless/sls-py-req-test.zip');
840837
t.true(zipfiles.includes(`flask${sep}__init__.py`), 'flask is packaged');
838+
t.true(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is packaged');
841839
t.true(
842840
zipfiles.includes(`lambda_decorators.py`),
843841
'lambda_decorators.py is packaged'
844842
);
845-
t.false(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is NOT packaged');
846843
t.end();
847844
});
848845

@@ -867,15 +864,12 @@ test(
867864

868865
const zipfiles = listZipFiles('.serverless/sls-py-req-test.zip');
869866
t.true(zipfiles.includes(`flask${sep}__init__.py`), 'flask is packaged');
867+
t.true(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is packaged');
870868
t.true(
871869
zipfiles.includes(`lambda_decorators.py`),
872870
'lambda_decorators.py is packaged'
873871
);
874872
t.true(zipfiles.includes(`foobar`), 'foobar is packaged');
875-
t.false(
876-
zipfiles.includes(`boto3${sep}__init__.py`),
877-
'boto3 is NOT packaged'
878-
);
879873

880874
const zipfiles_with_metadata = listZipFilesWithMetaData(
881875
'.serverless/sls-py-req-test.zip'
@@ -906,7 +900,7 @@ test('py3.6 can package flask in a project with a space in it', t => {
906900
sls(['package']);
907901
const zipfiles = listZipFiles('.serverless/sls-py-req-test.zip');
908902
t.true(zipfiles.includes(`flask${sep}__init__.py`), 'flask is packaged');
909-
t.false(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is NOT packaged');
903+
t.true(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is packaged');
910904
t.end();
911905
});
912906

@@ -920,10 +914,7 @@ test(
920914
sls(['--dockerizePip=true', 'package']);
921915
const zipfiles = listZipFiles('.serverless/sls-py-req-test.zip');
922916
t.true(zipfiles.includes(`flask${sep}__init__.py`), 'flask is packaged');
923-
t.false(
924-
zipfiles.includes(`boto3${sep}__init__.py`),
925-
'boto3 is NOT packaged'
926-
);
917+
t.true(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is packaged');
927918
t.end();
928919
},
929920
{ skip: !canUseDocker() }

tests/base/requirements-w-hashes.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,5 @@ werkzeug==0.14.1 \
8787
--hash=sha256:c3fd7a7d41976d9f44db327260e263132466836cef6f91512889ed60ad26557c \
8888
--hash=sha256:d5da73735293558eb1651ee2fddc4d0dedcfa06538b8813a2e20011583c9e49b \
8989
# via flask
90+
futures==3.2.0 \
91+
--hash=sha256:ec0a6cb848cc212002b9828c3e34c675e0c9ff6741dc445cab6fdd4e1085d1f1 \

0 commit comments

Comments
 (0)