爲什麼當我嘗試向測試站點註冊我的軟件包時發生以下情況?它與正規的網站註冊就好了:/在PyPI測試站點命令行上註冊ValueError
這是我的命令行中會發生什麼,當我試圖與PyPI將測試網站上註冊:
PS C:\Users\Dave\Desktop\distributing\hellodmt2Distribution> python setup.py register -r https://testpypi.python.org
i
running register
running egg_info
writing hellodmt2.egg-info\PKG-INFO
writing top-level names to hellodmt2.egg-info\top_level.txt
writing dependency_links to hellodmt2.egg-info\dependency_links.txt
reading manifest file 'hellodmt2.egg-info\SOURCES.txt'
writing manifest file 'hellodmt2.egg-info\SOURCES.txt'
Traceback (most recent call last):
File "setup.py", line 14, in <module>
download_url = "https://github.com/dmt257/hellodmt2/archive/0.1.tar.gz",
File "C:\Python27\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\site-packages\setuptools\command\register.py", line 10, in run
orig.register.run(self)
File "C:\Python27\lib\distutils\command\register.py", line 46, in run
self._set_config()
File "C:\Python27\lib\distutils\command\register.py", line 81, in _set_config
raise ValueError('%s not found in .pypirc' % self.repository)
ValueError: https://testpypi.python.org/pypi not found in .pypirc
PS C:\Users\Dave\Desktop\distributing\hellodmt2Distribution>
我setup.py:
#!/usr/bin/env
try:
from setuptools import setup
except importError:
from distutils.core import setup
setup(name = "hellodmt2",
description = "a source distribution test",
version = "0.1",
author = "David",
author_email = "[email protected]",
py_modules = ["hellodmt2"],
url = "https://github.com/dmt257/hellodmt2",
download_url = "https://github.com/dmt257/hellodmt2/archive/0.1.zip",
keywords = ["testing"],
)
這是我pypirc:
[distutils]
index-servers=
pypi
pypitest
[pypitest]
repository = https://testpypi.python.org/pypi
username = dmt257
password = mypasswordhere
[pypi]
repository = https://pypi.python.org/pypi
username = dmt257
password = mypasswordhere
的文件應該是'.pypirc'(注意領先''。)還是僅僅是一個錯字?你在哪裏找到這個文件? – SiHa
該文件是'pypi.pypirc'。我已經指出它在系統變量中的位置 - >路徑。我想我需要製作一個HOME env var並指向它在那裏的位置? –