PBR

setuptools import loop

Bug #1373148 reported by Robert Collins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PBR
Incomplete
Low
Unassigned

Bug Description

Not sure how I triggered this.

new cookiecutter project;
git tag 1.0.0;
python setup.py egg_info
Traceback (most recent call last):
  File "setup.py", line 18, in <module>
    import setuptools
  File "/home/robertc/.virtualenvs/openstack/local/lib/python2.7/site-packages/setuptools/__init__.py", line 12, in <module>
    from setuptools.extension import Extension
  File "/home/robertc/.virtualenvs/openstack/local/lib/python2.7/site-packages/setuptools/extension.py", line 7, in <module>
    from setuptools.dist import _get_unpatched
  File "/home/robertc/.virtualenvs/openstack/local/lib/python2.7/site-packages/setuptools/dist.py", line 17, in <module>
    import pkg_resources
  File "/home/robertc/.virtualenvs/openstack/local/lib/python2.7/site-packages/pkg_resources.py", line 2849, in <module>
    add_activation_listener(lambda dist: dist.activate())
  File "/home/robertc/.virtualenvs/openstack/local/lib/python2.7/site-packages/pkg_resources.py", line 755, in subscribe
    callback(dist)
  File "/home/robertc/.virtualenvs/openstack/local/lib/python2.7/site-packages/pkg_resources.py", line 2849, in <lambda>
    add_activation_listener(lambda dist: dist.activate())
  File "/home/robertc/.virtualenvs/openstack/local/lib/python2.7/site-packages/pkg_resources.py", line 2392, in activate
    declare_namespace(pkg)
  File "/home/robertc/.virtualenvs/openstack/local/lib/python2.7/site-packages/pkg_resources.py", line 1979, in declare_namespace
    _handle_ns(packageName, path_item)
  File "/home/robertc/.virtualenvs/openstack/local/lib/python2.7/site-packages/pkg_resources.py", line 1946, in _handle_ns
    loader.load_module(packageName)
  File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
    mod = imp.load_module(fullname, self.file, self.filename, self.etc)
  File "/home/robertc/work/oslo/oslo/__init__.py", line 19, in <module>
    'oslo').version_string()
  File "/home/robertc/work/pbr/pbr/version.py", line 475, in version_string
    return self.semantic_version().brief_string()
  File "/home/robertc/work/pbr/pbr/version.py", line 470, in semantic_version
    self._semantic = self._get_version_from_pkg_resources()
  File "/home/robertc/work/pbr/pbr/version.py", line 456, in _get_version_from_pkg_resources
    from pbr import packaging
  File "/home/robertc/work/pbr/pbr/packaging.py", line 40, in <module>
    from setuptools.command import easy_install
  File "/home/robertc/.virtualenvs/openstack/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 35, in <module>
    from setuptools import Command, _dont_write_bytecode
ImportError: cannot import name Command

Revision history for this message
Robert Collins (lifeless) wrote :

the callback into pbr.version is what triggered this, from the local package.

Revision history for this message
Robert Collins (lifeless) wrote :

e.g. we may need to make the string resolution lazy :/.

Revision history for this message
Robert Collins (lifeless) wrote :

once there is an egg_info it can be re-run successfully.

Changed in pbr:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Stephen Finucane (stephenfinucane) wrote :

I wasn't able to reproduce this using the latest version of pbr (commit 56c27c21d1). I'm going to mark as Incomplete pending further information on reproduction.

Changed in pbr:
status: Confirmed → Incomplete
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.