gpt4 book ai didi

python-3.x - pyproject.toml 找不到带有 setuptools python -m 构建格式的项目名称

转载 作者:行者123 更新时间:2023-12-05 02:31:28 24 4
gpt4 key购买 nike

在 pyproject.toml 中为 python 包提供名称的正确格式是什么?

pyproject.toml 文件

[project]
name = "foobar"
version = "0.0.1"

[build-system]
requires = ["setuptools>=40.8.0", "wheel"]
build-backend = "setuptools.build_meta"

使用 python -m build 调用的构建会导致以下错误。

running check
warning: check: missing required meta-data: name, url
warning: check: missing meta-data: either (author and author_email) or (maintainer and maintainer_email) should be supplied

基于 this reddit post question .我有同样的问题。

最佳答案

更新

在提出问题时,setuptools 不支持将其配置写入 pyproject.toml 文件 ( PEP 621 )。所以无法回答这个问题。

现在和自版本 61.0.0 以来,setuptools 支持 PEP 621:


原始答案

看来您正在尝试编写 PEP 621 -style pyproject.tomlsetuptools 构建后端。

但是,截至目前,setuptools 尚不支持 PEP 621。工作正在进行中:

PEP 621 支持到达setuptools 之前,您可以:

关于python-3.x - pyproject.toml 找不到带有 setuptools python -m 构建格式的项目名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71517365/

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