Exclude everything (**
), then include only the necessary ones (mymoduledir / **
), but remove the unnecessary ones (** / __ pycache __ / **
) ("! ** / __ pycache __ / ** "
) is the royal road, isn't it?
serverless.yml
package:
exclude:
- "**"
include:
- mymoduledir/**
- "!**/__pycache__/**"
By the way, since serverless-python-requirements
is used for packaging the pip module, it is automatically generated . requirements.zip
and ʻunzip_requirements.py` etc. are added regardless of the settings.
.git/
and .venv/
were included in the package.Recommended Posts