Skip to content

The 'Requires' tuple prevents upload to private Pypi server due to tuple (should be list) #186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tedops opened this issue Aug 20, 2014 · 3 comments
Milestone

Comments

@tedops
Copy link

tedops commented Aug 20, 2014

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.

@kevin-brown
Copy link

The line was added in 28a33ca and removed in 2ea7614.

@tedops
Copy link
Author

tedops commented 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).

Byron added a commit that referenced this issue Sep 2, 2014
Fixing issue #186: 'tuple index out of range' issue when uploading to private Pypi repository
@Byron Byron added this to the v0.3.3 milestone Nov 14, 2014
Byron added a commit that referenced this issue Nov 14, 2014
[skip ci]
See #186 for
the motivation of this fix.
@Byron
Copy link
Member

Byron commented Nov 19, 2014

The fix was merged, a list is now used, instead of a tuple.

@Byron Byron closed this as completed Nov 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants