LoginSignup
0
2

More than 5 years have passed since last update.

初級 Pythonista で Serverless Framework 初心者が勘違いしてた(理解してなかった) exclude/include の話

Posted at

全てを除外(**)してから、必要なもの(mymoduledir/**)だけ含めつつも、不要物(**/__pycache__/**)は取り除く("!**/__pycache__/**")のが王道、なのかな?

serverless.yml
package:
  exclude:
    - "**"
  include:
    - mymoduledir/**
    - "!**/__pycache__/**"

ちなみに、pip モジュールのパッケージングにはserverless-python-requirementsを利用しているので、自動生成される .requirements.zipunzip_requirements.py などは設定にかかわらず追加されます。

※ 油断して .git/.venv/ がパッケージに含まれていた事は内緒ですよ。

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2