Skip to content
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

setup.py register --repository is broken #76897

Closed
shimizukawa mannequin opened this issue Jan 29, 2018 · 3 comments
Closed

setup.py register --repository is broken #76897

shimizukawa mannequin opened this issue Jan 29, 2018 · 3 comments
Labels
stdlib Python modules in the Lib dir

Comments

@shimizukawa
Copy link
Mannequin

shimizukawa mannequin commented Jan 29, 2018

BPO 32716
Nosy @merwok, @shimizukawa, @zooba, @dstufft

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2021-02-03.18:19:24.512>
created_at = <Date 2018-01-29.22:58:48.140>
labels = ['library']
title = 'setup.py register --repository is broken'
updated_at = <Date 2021-02-03.18:19:24.511>
user = 'https://github.com/shimizukawa'

bugs.python.org fields:

activity = <Date 2021-02-03.18:19:24.511>
actor = 'steve.dower'
assignee = 'none'
closed = True
closed_date = <Date 2021-02-03.18:19:24.512>
closer = 'steve.dower'
components = ['Distutils']
creation = <Date 2018-01-29.22:58:48.140>
creator = 'shimizukawa'
dependencies = []
files = []
hgrepos = []
issue_num = 32716
keywords = []
message_count = 3.0
messages = ['311195', '312290', '386331']
nosy_count = 4.0
nosy_names = ['eric.araujo', 'shimizukawa', 'steve.dower', 'dstufft']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue32716'
versions = []

@shimizukawa
Copy link
Mannequin Author

shimizukawa mannequin commented Jan 29, 2018

Although document https://docs.python.org/3.6/distutils/packageindex.html#package-cmdoptions says "The --repository or -r option lets you specify a PyPI server different from the default", if there is no URL specified in .pypirc it will display "ValueError: not found in .pypirc".

::

  $ python3 setup.py register -r https://test.pypi.org/legacy/
  running register
  running egg_info
  writing dependency_links to test.egg-info/dependency_links.txt
  writing top-level names to test.egg-info/top_level.txt
  writing test.egg-info/PKG-INFO
  reading manifest file 'test.egg-info/SOURCES.txt'
  writing manifest file 'test.egg-info/SOURCES.txt'
  Traceback (most recent call last):
    File "setup.py", line 4, in <module>
      setup(name='test')
    File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/usr/lib/python3/dist-packages/setuptools/command/register.py", line 10, in run
      orig.register.run(self)
    File "/usr/lib/python3.5/distutils/command/register.py", line 45, in run
      self._set_config()
    File "/usr/lib/python3.5/distutils/command/register.py", line 80, in _set_config
      raise ValueError('%s not found in .pypirc' % self.repository)
  ValueError: https://test.pypi.org/legacy/ not found in .pypirc
  $ python3 -V
  Python 3.5.2

  $ lsb_release -a
  No LSB modules are available.
  Distributor ID: Ubuntu
  Description:    Ubuntu 16.04.3 LTS
  Release:        16.04
  Codename:       xenial

This behavior could be confirmed on Windows.

I think there are two correction methods.
One is to fix it so that we can specify any URL regardless of the setting of .pypirc.
The other is to write in the document that "-r option can specify server name or URL in .pypirc".

@shimizukawa shimizukawa mannequin added 3.7 (EOL) end of life stdlib Python modules in the Lib dir labels Jan 29, 2018
@merwok
Copy link
Member

merwok commented Feb 18, 2018

There are many open issues with .pypirc.

I don’t think that -r URL is a supported use case though; the docs should say that the usage is to add a section in .pypirc to define a repo, then use -r repo-section-name.

@merwok merwok removed the 3.7 (EOL) end of life label Feb 18, 2018
@zooba
Copy link
Member

zooba commented Feb 3, 2021

Distutils is now deprecated (see PEP-632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils.

If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools

@zooba zooba closed this as completed Feb 3, 2021
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

2 participants