PBR

Python setup.py develop fails with: "TypeError: dist must be a Distribution instance"

Bug #1651141 reported by Lucas Alvares Gomes
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
PBR
Won't Fix
Undecided
Unassigned

Bug Description

When running "python setup.py develop" to install Ironic in development mode it fails with:

Installed /opt/stack/ironic
Processing dependencies for ironic==6.2.1.dev485
Searching for futurist!=0.15.0,>=0.11.0
Reading https://pypi.python.org/simple/futurist/
Downloading https://pypi.python.org/packages/55/70/a957c3834a8877cc2fe15f2f042c842825c8dc17ed5b177a0594aff918cf/futurist-0.20.0.tar.gz#md5=6dd31fb46386aa0ace74146133649d58
Best match: futurist 0.20.0
Processing futurist-0.20.0.tar.gz
Writing /tmp/easy_install-EYrvdl/futurist-0.20.0/setup.cfg
Running futurist-0.20.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-EYrvdl/futurist-0.20.0/egg-dist-tmp-4uP9zD
ERROR:root:Error parsing
Traceback (most recent call last):

...

  File "/usr/lib64/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/opt/stack/tempest/.tox/py27/lib/python2.7/site-packages/setuptools/dist.py", line 319, in __init__
    _Distribution.__init__(self, attrs)
  File "/usr/lib64/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/opt/stack/tempest/.tox/py27/lib/python2.7/site-packages/setuptools/dist.py", line 386, in finalize_options
    ep.load()(self, ep.name, value)
  File "/opt/stack/tempest/.tox/py27/lib/python2.7/site-packages/pbr/core.py", line 119, in pbr
    'Error parsing %s: %s: %s' % (path, e.__class__.__name__, e))
setuptools.sandbox.UnpickleableException: DistutilsSetupError('Error parsing /tmp/easy_install-EYrvdl/futurist-0.20.0/setup.cfg: TypeError: dist must be a Distribution instance',)

[UPDATE]

Installing it with "pip install -e ." works

Changed in ironic:
status: New → Confirmed
description: updated
Revision history for this message
Dmitry Tantsur (divius) wrote :

Not sure why it's reported against Ironic, it even fails in Futurist. I'm redirecting it to pbr folks. In the meantime, have you tried upgrading setuptools?

affects: ironic → pbr
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

The preferred way to install packages is with pip, even in develop mode. Using "pip install -e" is correct.

Changed in pbr:
status: Confirmed → Won't Fix
Revision history for this message
Sorin Sbarnea (ssbarnea) wrote :

I encounter this error more and more often, on different packages. Does anyone knows the root cause?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.