PythonPyPI:ConfigParser在指向某个repo时崩溃
我有一个包(名称不好)PythonPyPI:ConfigParser在指向某个repo时崩溃,python,pypi,Python,Pypi,我有一个包(名称不好)python可重用,我正试图将其上载到PyPi存储库。我可以很好地将其上传到另一个存储库,但当尝试上传到这个特定的repo时,我会得到一个堆栈跟踪: running sdist running egg_info writing requirements to python_reusable.egg-info/requires.txt writing python_reusable.egg-info/PKG-INFO writing top-level names to py
python可重用
,我正试图将其上载到PyPi存储库。我可以很好地将其上传到另一个存储库,但当尝试上传到这个特定的repo时,我会得到一个堆栈跟踪:
running sdist
running egg_info
writing requirements to python_reusable.egg-info/requires.txt
writing python_reusable.egg-info/PKG-INFO
writing top-level names to python_reusable.egg-info/top_level.txt
writing dependency_links to python_reusable.egg-info/dependency_links.txt
reading manifest file 'python_reusable.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'python_reusable.egg-info/SOURCES.txt'
warning: sdist: standard file not found: should have one of README, README.rst, README.txt
running check
creating python_reusable-0.2.0
[redacted]
....
Writing python_reusable-0.2.0/setup.cfg
Creating tar archive
removing 'python_reusable-0.2.0' (and everything under it)
running register
Traceback (most recent call last):
File "setup.py", line 19, in <module>
install_requires=reqs
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/register.py", line 10, in run
orig.register.run(self)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/register.py", line 46, in run
self._set_config()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/register.py", line 72, in _set_config
config = self._read_pypirc()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/config.py", line 76, in _read_pypirc
current['username'] = config.get(server, 'username')
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ConfigParser.py", line 607, in get
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'global'
如果服务器或.pypirc有问题,我觉得应该会出现错误,这样我就知道发生了什么。那么,到底发生了什么
我自己不在这个包的任何地方使用ConfigParser 这原来是distutils中的一个bug。将在那里提交一个问题 我的皮皮克
[distutils]
index-servers =
exists
not_in_this_file
[exists]
...
#nothing else
我认为distuitls中有一个未捕获的异常,它没有检测到此文件部分中的错误信息
[distutils]
index-servers =
exists
not_in_this_file
[exists]
...
#nothing else