应将toml文件添加到版本控制以管理Python Poetry项目吗?

huangapple go评论70阅读模式
英文:

Should the toml file be added to version control for a python poetry managed project?

问题

"Should the pyproject.toml file be added to version control for a python poetry managed project? The poetry documentation mentions adding the lock file, however I was unable to find guidance on the pyproject.toml file."

https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control

英文:

Should the pyproject.toml file be added to version control for a python poetry managed project? The poetry documentation mentions adding the lock file, however I was unable to find guidance on the pyproject.toml file.

https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control

答案1

得分: 2

是的,你应该这样做。

pyproject.toml 是基于 Poetry 的项目的核心。它包含了像名称和版本之类的元数据以及直接依赖项的定义。

没有这个文件,就无法安装项目及其依赖项。此外,你也无法构建和发布包。

锁定文件本身并不包含足够的信息来安装项目(https://github.com/python-poetry/poetry/issues/1301)。

英文:

Yes, you should.

The pyproject.toml is the heart of your Poetry based project. It contains the metadata like name and version and the definitions of the direct dependencies.

Without this file it is impossible to install the project and its dependencies. Furthermore you cannot build and publish the package.

The lock file only does not include enough information to install the project (https://github.com/python-poetry/poetry/issues/1301).

huangapple
  • 本文由 发表于 2023年3月7日 12:48:56
  • 转载请务必保留本文链接:https://go.coder-hub.com/75658135.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定