Issue #244 resolved

setup.py register and upload command and missing repository

Guy Rozendorn
created an issue

if you do: {{{ python setup.py register -r noSuchRepository }}} you get an error

but if you do: {{{ python setup.py register -r sectionExistsWithoutRepositoryValue }}}

it assumes the repository is pypi.python.org (default repository), and it should throw an error.

Comments (4)

  1. Guy Rozendorn reporter

    This "repository" argument is ambiguous. distribute (and distutils) accept both:

    • The DEFAULT_REPOSITORY url
    • A section name in .pypirc

    If its not the DEFAULT_REPOSITORY, it looks for the a section inside .pypirc with a matching name. In the current code, a section *can* have (it should be *must* have) a repository value. If it doesn't, DEFAULT_REPOSITORY is taken into account. This a second ambiguity.

    A refactoring needs to be done, and resolve the disambiguity. this is far beyond the scope of this ticket. In this ticket I will just make sure a ValueError is raised if a section is used without a repository value in it.

  2. Guy Rozendorn reporter

    This is important in the following use-case: You have two indexes in .pypirc: a one for pypi.python.org, and a company internal one. Without this fix, if you had forgotten to have a repository value for your internal section, you would've uploaded the internal (private) package to pypi.python.org

    resolved in 836:1a1ab844f03e

  3. Log in to comment