PBR

python-keystoneclient 0.2.4 pypi package fails to install

Bug #1186194 reported by Joel Wright
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
PBR
Fix Released
Undecided
Monty Taylor

Bug Description

When I try to install python-keystoneclient 0.2.4 using pip in a virtualenv it fails complaining about a bad local file header and breaks the virtual environment.

Python version: 2.7.5
OS: Mac OS X 10.8.3

Installed /Users/jjw/Work/Envs/keystone/build/python-keystoneclient/distribute-0.6.45-py2.7.egg

/Users/jjw/Work/Envs/keystone/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/dist.py:286: UserWarning: Module pkg_resources was already imported from /Users/jjw/Work/Envs/keystone/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py, but /Users/jjw/Work/Envs/keystone/build/python-keystoneclient/distribute-0.6.45-py2.7.egg is being added to sys.path

/Users/jjw/Work/Envs/keystone/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/dist.py:286: UserWarning: Module setuptools was already imported from /Users/jjw/Work/Envs/keystone/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/__init__.py, but /Users/jjw/Work/Envs/keystone/build/python-keystoneclient/distribute-0.6.45-py2.7.egg is being added to sys.path

error in setup command: Error parsing /Users/jjw/Work/Envs/keystone/build/python-keystoneclient/setup.cfg: ZipImportError: bad local file header in /Users/jjw/Work/Envs/keystone/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg

----------------------------------------

Command python setup.py egg_info failed with error code 1 in /Users/jjw/Work/Envs/keystone/build/python-keystoneclient

Exception information:
Traceback (most recent call last):
  File "/Users/jjw/Work/Envs/keystone/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/basecommand.py", line 139, in main
    status = self.run(options, args)
  File "/Users/jjw/Work/Envs/keystone/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/commands/install.py", line 266, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/Users/jjw/Work/Envs/keystone/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 1057, in prepare_files
    req_to_install.run_egg_info()
  File "/Users/jjw/Work/Envs/keystone/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 236, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/Users/jjw/Work/Envs/keystone/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/util.py", line 662, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /Users/jjw/Work/Envs/keystone/build/python-keystoneclient

Revision history for this message
Joseph Heck (heckj) wrote :

If you install this latest python-keystoneclient into virtual created with --distribute, that seems to work around this issue.

(i.e.
    virtual .venv --distribute
    source .venv/bin/activate
    pip install python-keystoneclient

Revision history for this message
Joel Wright (joel-wright-k) wrote :

I can confirm that using distribute rather than setuptools does work around the problem here. Thanks for the tip.

Revision history for this message
Dolph Mathews (dolph) wrote :
affects: python-keystoneclient → openstack-ci
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

I think this is a problem in pbr or d2to1. I had a similar report against a project that's not part of OpenStack where I'm using pbr for packaging (https://github.com/dhellmann/smiley/issues/4).

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

Mailing list thread about quantum client seeing the same issue: http://lists.openstack.org/pipermail/openstack-dev/2013-June/009881.html

Clark Boylan (cboylan)
no longer affects: openstack-ci
Revision history for this message
Monty Taylor (mordred) wrote :

Investigating. It's 100% due to older setuptools not properly being able to update itself via setup_requires. Newer distribute handles it better. It's not just pbr-based things. MySQL-python has issues with older setuptools as well.

Changed in pbr:
assignee: nobody → Monty Taylor (mordred)
status: New → Confirmed
Revision history for this message
Troy Toman (troy-toman) wrote :

I'm not sure if this is related. But, I spent the morning chasing down what may be a related bug. I was unable to install python-swiftclient on my mac this morning. Ultimately I chased it down to a problem parsing setup.cfg.

It turns out that if you have installed the configparser module in Python 2.7.5 it will not parse the config file directly. I have been able to get it to work by unstalling the module which forces pbr to use ConfigParse instead. I think this has to do with the unicode support in configparser.

Like I said, not sure if this is the same problem or not. Here is the trace I was getting:

Downloading/unpacking pbr
  Downloading pbr-0.5.19.tar.gz (112kB): 112kB downloaded
  Running setup.py egg_info for package pbr
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/Users/troytoman/nikola/build/pbr/setup.py", line 22, in <module>
        **util.cfg_to_args())
      File "pbr/d2to1/util.py", line 224, in cfg_to_args
        hook_fn = resolve_name(hook)
      File "pbr/d2to1/util.py", line 167, in resolve_name
        ret = __import__('.'.join(module_name), fromlist=[attr_name])
    TypeError: Item in ``from list'' not a string
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/Users/troytoman/nikola/build/pbr/setup.py", line 22, in <module>

    **util.cfg_to_args())

  File "pbr/d2to1/util.py", line 224, in cfg_to_args

    hook_fn = resolve_name(hook)

  File "pbr/d2to1/util.py", line 167, in resolve_name

    ret = __import__('.'.join(module_name), fromlist=[attr_name])

TypeError: Item in ``from list'' not a string

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /Users/troytoman/nikola/build/pbr
Storing complete log in /Users/troytoman/.pip/pip.log

Revision history for this message
James Meredith (james-meredith) wrote :

Troy,
Can you elaborate on exactly what you did to fix this? I'm having the same issue.

Monty Taylor (mordred)
Changed in pbr:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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