2017-03-24 6 views
0

python-reusable에 PyPi 저장소에 업로드하려고하는 패키지가 있습니다. 나는 다른 저장소 미세에 업로드 할 수 있지만,이 특정의 repo에 업로드하려고 할 때, 나는 스택 추적 얻을 :python pypi : 특정 repo를 가리킬 때 ConfigParser가 튀어 나옴

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' 

내가 다른 pypi 서버에 업로드하려고 작동을 :

Writing python_reusable-0.2.0/setup.cfg 
Creating tar archive 
removing 'python_reusable-0.2.0' (and everything under it) 
running register 
Registering python_reusable to [REDACTED] 
Server response (200): OK 
running upload 
Submitting dist/python_reusable-0.2.0.tar.gz to [REDACTED] 
Server response (200): OK 

서버 또는 .pypirc에 문제가있는 경우 오류가 전파되어서 무슨 일이 일어나는지 알 것 같습니다. 그래서, 무슨 일이 일어나고있는거야?

저는이 패키지 어디서나 직접 ConfigParser를 사용하지 않습니다.

답변

0

이것은 distutils의 버그로 판명되었습니다. 거기에 문제를 제기 할 것입니다.

나는

[distutils] 
index-servers = 
    exists 
    not_in_this_file 

[exists] 
    ... 

#nothing else 

내가()가 없습니다 not_in_this_file 섹션을 감지하지 distuitls의 캐치되지 않는 예외가 있다고 생각 내 .pypirc에 있었다.