Trying to upload the latest GitPython-0.3.2.RC1.tar.gz (as downloaded from https://pypi.python.org/pypi/GitPython/0.3.2.RC1) into a private pypi repository errors out with a 'tuple index out of range' error using Python/distutils 2.7.7.
This is due to the "requires:" value in setup.py being a tuple instead of a list.
In python2.7/distutils/command/upload.py:142-150, the following block throws the error:
for key, value in data.items():
if not isinstance(value, list): # Has Content
value = [value]
for value in value:
if isinstance(value, tuple):
fn = ';filename="%s"' % value[0]
value = value[1] # <= index doesn't exist in the 'requires' tuple
else:
fn = ""
once this line is encountered in GitPython-0.3.2.RC1/setup.py:76:
requires=('gitdb (>=0.5.1)',),
NOTE: This error still exists in master and the 0.3.2-RC1 tag, but not in 0.3 branch. PR coming shortly.
Activity
Fixing 'tuple index out of range' issue with distutils/command/upload…
kevin-brown commented on Aug 20, 2014
The line was added in 28a33ca and removed in 2ea7614.
tedops commented on Aug 20, 2014
@kevin-brown, yeah that's where it was removed in 0.3. But, it hasn't been merged yet to master (https://github.com/gitpython-developers/GitPython/blob/master/setup.py#L78), and it's still in the latest release available as of this writing on pypi.python.org (https://github.com/gitpython-developers/GitPython/blob/0.3.2-RC1/setup.py#L76).
Merge pull request #187 from tsheibar/master
Don't use tuples in setup.py requirement specs
Byron commented on Nov 19, 2014
The fix was merged, a list is now used, instead of a tuple.