上传到PyPi返回无效的URI

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

我正在尝试将我的包上传到PyPi,并不断收到此错误:

 HTTPError: 400 Client Error: 'github.com/Palashio/Libra' is an invalid value for Home-Page. Error: Invalid URI See https://packaging.python.org/specifications/core-metadata for url: https://test.pypi.org/legacy/

我正在使用本教程:https://packaging.python.org/tutorials/packaging-projects/#uploading-your-project-to-pypi

运行此行时会发生这种情况:

python3 -m twine upload --repository testpypi dist/*

并输入__令牌__作为用户名,并输入test.pypi.org生成的令牌作为密码

这是我的目录所包含的:build,dist,reponame(其中包含所有软件包文件),reponame.eggs-info,LICENSE.txt,README.md,setup.cfg和setup.py

这是我的setup.py文件的外观:

import setuptools

with open("README.md", "r") as fh:
    long_description = fh.read()

setuptools.setup(
    name="libradocs", # Replace with your own username
    version="0.0.0",
    author="username-from-test.pypi",
    author_email="[email protected]",
    description="A small example package",
    long_description=long_description,
    long_description_content_type="text/markdown",
    homepage="https://github.com/Palashio/Libra",
    packages=setuptools.find_packages(),
    classifiers=[
        "Programming Language :: Python :: 3",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
    ],
    python_requires='>=3.6',
)

在reponame文件夹中,我有5个不同的文件夹,它们具有希望用户能够使用的不同文件和功能。我在根目录和天秤座内的每个子文件夹中都放置了空白的[[init。py文件。

python github pip setuptools pypi
1个回答
0
投票
homepage参数已被弃用。用url代替它,你应该会很好。 docs中的示例也遵循这种格式。
© www.soinside.com 2019 - 2024. All rights reserved.