-
Notifications
You must be signed in to change notification settings - Fork 293
exclude
does not work on dependencies
#138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
That's on purpose so that you don't have to enumerate the packages if you go with an exclude all, then include some approach that I often use: package:
exclude:
- '**/*'
include:
- handler.py I think the best approach to what you're asking for would be to implement a plugin specific exclude option that would make your example look like: custom:
pythonRequirements:
exclude:
- __pycache__/**
- pandas/tests/** or just a toggle to turn off the plugin's code that adds to the includes: custom:
pythonRequirements:
modifyPackageInclude: false |
I don't really have the time to implement either feature, but would be happy to accept a PR for either approach. |
We've more or less solved that for us with the
|
Nice workaround using a great plugin! |
I'm trying to remove some language models from spacy to reduce the overall size, but when the above is used in combination with What I wrote
Output:
Interesting that the |
Hey @kalinkirev, I found that I had to remove files from the built zip file to get this working. I wrote a blog post with an example here: https://dev.to/sam152/crude-python-tree-shaking-for-squeezing-into-aws-lambda-package-size-limits-357a |
Files that are installed via
requirements.txt
can't be excluded. For example this doesn't work:The text was updated successfully, but these errors were encountered: