diff --git a/README.md b/README.md index d1d03daa..e519289e 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,16 @@ custom: This will remove all folders within the installed requirements that match the names in `slimPatterns` +#### Option not to strip binaries + +In some cases, stripping binaries leads to problems like "ELF load command address/offset not properly aligned", even when done in the Docker environment. You can still slim down the package without `*.so` files with +```yaml +custom: + pythonRequirements: + slim: true + strip: false +``` + ### Lamba Layer Another method for dealing with large dependencies is to put them into a [Lambda Layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). diff --git a/lib/slim.js b/lib/slim.js index 965be7d0..ae9155fb 100644 --- a/lib/slim.js +++ b/lib/slim.js @@ -3,7 +3,12 @@ const glob = require('glob-all'); const fse = require('fs-extra'); const getStripMode = options => { - if (options.slim === false || options.slim === 'false') { + if ( + options.strip === false || + options.strip === 'false' || + options.slim === false || + options.slim === 'false' + ) { return 'skip'; } else if (options.dockerizePip) { return 'docker';