我正在尝试将项目上传到 PyPI,但我这个命令setup.py sdist upload -r pypitest
失败:
File "setup.py", line 3, in <module>
setup(name='spongebot', version='1.0', packages=find_packages(), description = 'Upload a gif of Spongebob')
File "C:UsersJavier JiménezAnaconda3libsite-packagessetuptools__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "C:UsersJavier JiménezAnaconda3libdistutilscore.py", line 148, in setup
dist.run_commands()
File "C:UsersJavier JiménezAnaconda3libdistutilsdist.py", line 955, in run_commands
self.run_command(cmd)
File "C:UsersJavier JiménezAnaconda3libdistutilsdist.py", line 974, in run_command
cmd_obj.run()
File "C:UsersJavier JiménezAnaconda3libdistutilscommandupload.py", line 63, in run
self.upload_file(command, pyversion, filename)
File "C:UsersJavier JiménezAnaconda3libdistutilscommandupload.py", line 73, in upload_file
raise AssertionError("unsupported schema " + schema)
AssertionError: unsupported schema
setup.py
:
from setuptools import setup, find_packages
setup(
name='spongebot',
version='1.0',
packages=find_packages(),
description='Upload a gif of Spongebob',
)
修改~/.pypirc
文件,确保包含架构("https"(:
[distutils]
index-servers=
pypi
pypitest
[pypitest]
repository = https://test.pypi.org/legacy/
username = your.username
[pypi]
# repository = https://pypi.python.org/pypi
username = your.username