当我 `pip show` 我的 Python 包时,字段丢失了

问题描述 投票:0回答:0

我最近将我的第一个 Python 包上传到 PyPI。

pyproject.toml
的相关部分定义如下(完整文件可用here):

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "jutility"
version = "0.0.4"
license = {text = "MIT License"}
authors = [
    {name = "Jake Levi", email = "[email protected]"},
]

# ...

[project.urls]
homepage = "https://github.com/jakelevi1996/jutility"

用命令

python3 -m pip install -U jutility
安装这个包后,我运行命令
python3 -m pip show jutility
,得到以下输出:

Name: jutility
Version: 0.0.4
Summary: Collection of Python utilities intended to be useful for machine learning research and experiments
Home-page: 
Author: 
Author-email: Jake Levi <[email protected]>
License: MIT License
Location: /usr/local/lib/python3.10/dist-packages
Requires: matplotlib, numpy, Pillow
Required-by: 

值得注意的是,

Home-page
Author
字段在
pip show
的输出中是空的,尽管它们似乎是在
pyproject.toml
中定义的。

我应该如何更改

pyproject.toml
以使这些字段在
pip show
输出中正确显示?

版本方面,我在我的 Windows 10 PC 上使用 Python 3.7.6 构建并上传了这些包到 PyPI,但我也尝试下载和安装这个包并显示

pip show
输出从谷歌 Colab 笔记本使用 Python 3.10.11 .该包在 Colab 笔记本中完全按预期工作,但我得到相同的
pip show
输出,但
Home-page
Author
字段为空。我只想知道我需要更改什么才能正确显示这些字段。

python python-3.x pip package pypi
© www.soinside.com 2019 - 2024. All rights reserved.