背景
以下デモを触っていたら、requirements.in ってのがあって、なに?と思ったら便利なことを知らされた。
pythonist にとっては当たり前のことのような気がするけど
概要
- requirements.in に適当に記述して、compile すると、依存関係をよしなに解決して requirements.txt を生成してくれる。
- 実際に python で利用するのは txt 側なので、git で両方管理しておけば、library 調整が楽になる
ってことかな、と。常に最新版でいいやって思ったとしても、正確な環境を残せるってのは素敵ですね
で、compile は以下を利用
pip-tools
pip-tools = pip-compile + pip-sync
A set of command line tools to help you keep your pip-based packages fresh, even when you've pinned them. You do pin them, right? (In building your Python application and its dependencies for production, you want to make sure that your builds are predictable and deterministic.)
あとがき
以下とか出来そうなので調べたいところだけど、とりあえず後回し・・
現状、python 環境を変えつつしか方法知らない・・。
その前に、venv を学習しないとあかんっぽいけど・・
それ以前に、セキュリティを・・
おじいちゃんの脳には入っていきません