@@ -21,7 +21,7 @@ This will automatically add the plugin to your project's `package.json` and the
21
21
` serverless.yml ` . That's all that's needed for basic use! The plugin will now bundle your python
22
22
dependencies specified in your ` requirements.txt ` or ` Pipfile ` when you run ` sls deploy ` .
23
23
24
- For a more in depth introduction on how to user this plugin, check out
24
+ For a more in depth introduction on how to user this plugin, check out
25
25
[ this post on the Serverless Blog] ( https://serverless.com/blog/serverless-python-packaging/ )
26
26
27
27
If you're on a mac, check out [ these notes] ( #applebeersnake-mac-brew-installed-python-notes ) about using python installed by brew.
@@ -113,17 +113,17 @@ except ImportError:
113
113
pass
114
114
` ` `
115
115
# ## Slim Package
116
- _Works on non 'win32' environments : Docker, WSL are included_
117
- To remove the tests, information and caches from the installed packages,
118
- enable the `slim` option. This will : ` strip` the `.so` files, remove `__pycache__`
119
- and `dist-info` directories as well as `.pyc` and `.pyo` files.
116
+ _Works on non 'win32' environments : Docker, WSL are included_
117
+ To remove the tests, information and caches from the installed packages,
118
+ enable the `slim` option. This will : ` strip` the `.so` files, remove `__pycache__`
119
+ and `dist-info` directories as well as `.pyc` and `.pyo` files.
120
120
` ` ` yaml
121
121
custom:
122
122
pythonRequirements:
123
123
slim: true
124
- ` ` `
125
- # ### Custom Removal Patterns
126
- To specify additional directories to remove from the installed packages,
124
+ ` ` `
125
+ # ### Custom Removal Patterns
126
+ To specify additional directories to remove from the installed packages,
127
127
define a list of patterns in the serverless config using the `slimPatterns`
128
128
option and glob syntax. These paterns will be added to the default ones (`**/*.py[c|o]`, `**/__pycache__*`, `**/*.dist-info*`).
129
129
Note, the glob syntax matches against whole paths, so to match a file in any
@@ -134,7 +134,7 @@ custom:
134
134
slim: true
135
135
slimPatterns:
136
136
- "**/*.egg-info*"
137
- ` ` `
137
+ ` ` `
138
138
To overwrite the default patterns set the option `slimPatternsAppendDefaults` to `false` (`true` by default).
139
139
` ` ` yaml
140
140
custom:
@@ -143,10 +143,10 @@ custom:
143
143
slimPatternsAppendDefaults: false
144
144
slimPatterns:
145
145
- "**/*.egg-info*"
146
- ` ` `
147
- This will remove all folders within the installed requirements that match
148
- the names in `slimPatterns`
149
- # # Omitting Packages
146
+ ` ` `
147
+ This will remove all folders within the installed requirements that match
148
+ the names in `slimPatterns`
149
+ # # Omitting Packages
150
150
You can omit a package from deployment with the `noDeploy` option. Note that
151
151
dependencies of omitted packages must explicitly be omitted too. By default,
152
152
the following packages are omitted as they are already installed on Lambda :
@@ -199,7 +199,7 @@ custom:
199
199
useDownloadCache: true
200
200
cacheLocation: '/home/user/.my_cache_goes_here'
201
201
staticCacheMaxVersions: 10
202
-
202
+
203
203
` ` `
204
204
205
205
# ## Extra pip arguments
0 commit comments