gpt4 book ai didi

python - 如果我有 setup.py,还需要 setup.cfg 吗?

转载 作者:行者123 更新时间:2023-12-05 06:51:40 26 4
gpt4 key购买 nike

我使用 setuptools 构建我的 python 包。我只使用了一个 setup.py 文件,但我根据 this tutorial 添加了一个 pyproject.toml。 ,似乎最近已更新以包含该文件。

我无法从该教程或 this one 中看出什么, 如果我还在使用 setup.py,我是否需要有一个 setup.cfg,如果需要,它应该包含什么。它确实显示了包含两者的文件树,但随后暗示文件结构仅指示(对于主要使用 setup.cfg 的人)

If you create a setup.py file, this will enable direct interaction with setup.py (which generally should be avoided), and editable installs. This file used to be required, but can be omitted in modern setuptools.

最佳答案

如果您有 setup.py 文件,则不需要 setup.cfg 文件。 setup.cfg 的一种用途是覆盖 setup.py 文件中提到的默认值。如果您查看流行的库,我们仍然使用 setup.py 文件进行打包/分发。

关于python - 如果我有 setup.py,还需要 setup.cfg 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66118575/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com