LoginSignup
0
0

背景

以下デモを触っていたら、requirements.in ってのがあって、なに?と思ったら便利なことを知らされた。
pythonist にとっては当たり前のことのような気がするけど

概要

  • requirements.in に適当に記述して、compile すると、依存関係をよしなに解決して requirements.txt を生成してくれる。
  • 実際に python で利用するのは txt 側なので、git で両方管理しておけば、library 調整が楽になる

ってことかな、と。常に最新版でいいやって思ったとしても、正確な環境を残せるってのは素敵ですね :yum:

で、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.)

あとがき

以下とか出来そうなので調べたいところだけど、とりあえず後回し・・:sweat:

  • python version を指定した compile
    • py -{version} で 行けそうだったんだけど・・なんか上手くいかなかったので
      image.png

現状、python 環境を変えつつしか方法知らない・・。
その前に、venv を学習しないとあかんっぽいけど・・
それ以前に、セキュリティを・・

おじいちゃんの脳には入っていきません :cry:

0
0
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
0