Migration to pbr breaks setup.py install

Bug #1187452 reported by Carl Baldwin
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
PBR
Fix Released
Critical
Monty Taylor
python-neutronclient
Invalid
Undecided
Unassigned

Bug Description

In testing the python-quantumclient 2.2.2a tarball, I found that setup.py was broken for me when I ran it from a fresh virtualenv. I ran git bisect (I love that command) and found the commit causing it.

commit 898acc30f76b2629aa740976103b99f10801d593
...

    Migrate to pbr.
    Fixes bug 1179007
    Change-Id: I6d7a6b7c85361e1568719ad11035158f4f6d9b35

I reverted this commit in my sandbox to see if it would fix the problem. It did. After reverting setup.py install ran cleanly and the client was useable on both Ubuntu Linux and Mac OS where I had previously had problems.

Attached is a transcript from my terminal where I attempted the installation.

Revision history for this message
Carl Baldwin (carl-baldwin) wrote :
Revision history for this message
Carl Baldwin (carl-baldwin) wrote :

On the mailing list, Monty Taylor suggested creating the virtualenv with --distribute. This solved the initial problem and setup.py ran to completion with no errors and 0 exit status.

The next problem that I ran into is that setup.py doesn't actually install the dependencies and quantum won't run after it completes. Reverting the commit mentioned above still fixes this problem. So, I'm keeping this bug open. I've attached a new log showing these attempts. I still see this problem on both Mac OS and Linux.

Regarding --distribute. Can this not be fixed? I think we'll see questions about this on the mailing list for a long time to come.

Revision history for this message
Carl Baldwin (carl-baldwin) wrote :

There is more to this problem than in https://bugs.launchpad.net/bugs/1186194. Mark not a duplicate.

Revision history for this message
Carl Baldwin (carl-baldwin) wrote :

Short of reverting the commit mentioned above, here is another work-around.

$ virtualenv --distribute ve
$ . ./ve/bin/activate
$ pip install -r tools/pip-requires
$ python setup.py install

Revision history for this message
Carl Baldwin (carl-baldwin) wrote :

With a recent commit that renamed tools/pip-requires, the pip install command in comment #4 should be this:

pip install -r requirements.txt

Revision history for this message
Carl Baldwin (carl-baldwin) wrote :

https://review.openstack.org/#/c/31783 seems to fix the remainder of the problem where the client's dependencies were not being installed. At the time of this writing, it is still in review.

Mark McLoughlin (markmc)
Changed in pbr:
status: New → In Progress
Revision history for this message
Mark McLoughlin (markmc) wrote :

https://review.openstack.org/31783 has been merged and tagged in 0.5.15

Changed in pbr:
status: In Progress → Fix Released
Mark McLoughlin (markmc)
Changed in pbr:
importance: Undecided → Critical
assignee: nobody → Monty Taylor (mordred)
Revision history for this message
Carl Baldwin (carl-baldwin) wrote :

Update. With pbr 0.5.16, running "python setup.py install" from python-quantumclient does not work out of the box. When I run quantum I get: "pkg_resources.DistributionNotFound: pbr>=0.5.10,<0.6".

However, running "pip install file://$PWD" from the python-quantumclient directory does work.

Revision history for this message
Stephen Ma (stephen-ma) wrote :

I am unable to run the neutron unit tests because of this problem as well. The command "tox -e py27" failed during the setup of python-quantumclient 2.2.2. The failure occurred when the python-quantumclient 2.2.2's setup tried to install pbr. I didn't keep the exact error message, but it said it that is unable to find a suitable pbr version that satisfies python-quantumclient's requirements. The version is "pbr>=0.5.10,<0.6".

One thing I noticed is that in the python-quantumclient's requirements.txt file, required version pbr is ">=0.5.16,<0.6". So it is not clear where the version 0.5.10 is derived.

Revision history for this message
Stephen Ma (stephen-ma) wrote :

As a workaround so that the tox -e py27 will run the unit tests, I modified neutron's requirements.txt to have python-quantumclient 2.2.1 loaded instead:

In requirements.txt, the line,
python-quantumclient>=2.2.0,<3.0.0

to

python-quantumclient>=2.2.0,<2.2.2

Revision history for this message
Akihiro Motoki (amotoki) wrote :

more than two years and it works as expected.

Changed in python-neutronclient:
status: New → Incomplete
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

This bug is > 180 days without activity. We are unsetting assignee and milestone and setting status to Incomplete in order to allow its expiry in 60 days.

If the bug is still valid, then update the bug status.

Changed in python-neutronclient:
status: Incomplete → Invalid
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.