No module pbr.version after installing fuelclient with recent setuptools

Bug #1443328 reported by Sebastian Kalinowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Won't Fix
High
Roman Prykhodchenko

Bug Description

Steps to reproduce:
 - clone fuelclient from github
 - go to python-fuelclient dir
 - install fuelclient in clean virtual environemnt created with some recent "virtualenv" (12.0.7) and having one of the newer setuptools (<12.0)
 - after installation try to run any command, like "fuel --help"

Error:
Traceback (most recent call last):
  File "/home/vagrant/.virtualenvs/tmp-3f29551b40522d84/bin/fuel", line 6, in <module>
    from fuelclient.cli.parser import main
  File "/home/vagrant/.virtualenvs/tmp-3f29551b40522d84/local/lib/python2.7/site-packages/fuelclient/cli/parser.py", line 18, in <module>
    from fuelclient.cli.actions import actions
  File "/home/vagrant/.virtualenvs/tmp-3f29551b40522d84/local/lib/python2.7/site-packages/fuelclient/cli/actions/__init__.py", line 19, in <module>
    from fuelclient.cli.actions.deploy import DeployChangesAction
  File "/home/vagrant/.virtualenvs/tmp-3f29551b40522d84/local/lib/python2.7/site-packages/fuelclient/cli/actions/deploy.py", line 16, in <module>
    from fuelclient.cli.actions.base import Action
  File "/home/vagrant/.virtualenvs/tmp-3f29551b40522d84/local/lib/python2.7/site-packages/fuelclient/cli/actions/base.py", line 22, in <module>
    from fuelclient.cli import error
  File "/home/vagrant/.virtualenvs/tmp-3f29551b40522d84/local/lib/python2.7/site-packages/fuelclient/cli/error.py", line 17, in <module>
    from keystoneclient.exceptions import Unauthorized
  File "/home/vagrant/.virtualenvs/tmp-3f29551b40522d84/local/lib/python2.7/site-packages/keystoneclient/__init__.py", line 16, in <module>
    import pbr.version
ImportError: No module named pbr.version

This problem exists because during installation pbr is present (it's in "setup_requires" of python-fuelclient) and keystoneclient requires pbr as a runtime dependency (install_requires/requirements.txt) but when it is installed setuptools do not install pbr "for runtime" and after installation is over, it is removed.

Workarounds:
 - install fuelcient with "pip install ."
 - use older version of setuptools (3.6 confimed working)

Dmitry Pyzhov (dpyzhov)
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Roman Prykhodchenko (romcheg)
Changed in fuel:
status: New → Confirmed
Revision history for this message
Roman Prykhodchenko (romcheg) wrote :

After a quick chat with the maintainer of pbr I lerned that installing packages using python setup.py install is not supported.

This problem indeed does not occur, if pip is used. The question now is whether it's reasonable to use pip or refuse to use pbr and all sweet features it brings.

Revision history for this message
Roman Prykhodchenko (romcheg) wrote :

I made a few tests to check whether python setup.py install will work if a package does not depend on pbr but one of its depencencies does. It appears that it doesn't. I tried this kind of setup.py:

  import setuptools

  #python-keystoneclient>=0.10.0,<=1.1.0
  setuptools.setup(name='proj',
                   version='0.0.1',
                   packages=['proj'],
                   install_requires=['python-keystoneclient>=0.10.0,<=1.1.0'],
                   entry_points={'console_scripts': ['proj_test=proj.main:main']})

It caused the following error: http://xsnippet.org/360634/
Implementing easy_install support in pbr is also unlikely http://lists.openstack.org/pipermail/openstack-dev/2013-September/015525.html

Changed in fuel:
status: Confirmed → Won't Fix
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.