[pbr] Issue when installing a package possibly due to pbr incompatibility with cli-helpers==0.2.0

asked 2017-08-14 17:44:07 -0500

jc gravatar image

updated 2017-08-22 14:26:49 -0500

rbowen gravatar image

I face this error message:

root@komit:/opt/odoo/code/docker/my_pack# python setup.py install  
ERROR:root:Error parsing  
Traceback (most recent call last):  
  File "/usr/local/lib/python2.7/dist-packages/pbr/core.py", line 111, in pbr  
    attrs = util.cfg_to_args(path, dist.script_args)   
  File "/usr/local/lib/python2.7/dist-packages/pbr/util.py", line 267, in cfg_to_args  
  File "/usr/local/lib/python2.7/dist-packages/pbr/util.py", line 569, in wrap_commands    
    cmdclass = ep.resolve()  
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2322, in resolve  
    module = __import__(self.module_name, fromlist=['__name__'], level=0)  
ImportError: No module named tasks  
error in setup command: Error parsing /opt/odoo/code/docker/my_pack/setup.cfg: ImportError: No module named tasks

To reproduce:

pip install cli-helpers>=0.2.0  # But it will work with 0.1.0
git init my_pack && cd my_pack
echo """[metadata]
name = foo
author = bar
author_email = foo@bar""" > setup.cfg

echo """import setuptools
setuptools.setup(setup_requires=['pbr'], pbr=True)
""" > setup.py
git add setup.cfg setup.py && git commit -m "foo"
python setup.py install

But this works well when using version 0.1.0 of cli-helpers.

Notes: the full story behind this bug report can be found here: https://github.com/OCA/pylint-odoo/is...

edit retag flag offensive close merge delete