pip-requires and virtualenv don't play together nicely
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Jay Pipes |
Bug Description
OK, so I'm familiar with virtualenv, and have been developing Nova with virtualenv for a while now, with no problems if I use the instructions I put up on my blog here:
http://
However, if I try to use the "automated" virtualenv/
I'm on Linux, Ubuntu Lucid, but it really shouldn't matter *what* I have installed locally if we use virtualenv properly. Let me show you what happens when I try to do things "the automated" way using run_tests.sh and /tools/
jpipes@
You need to install the Nova virtualenv before you can run this.
Please run tools/install_
jpipes@
Checking for pip... done.
Checking for virtualenv... done.
Creating venv... done.
Installing dependencies with pip (this can take a while)...
Exception:
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
requirement
File "/usr/lib/
if req_to_
File "/usr/lib/
dist = pkg_resources.
File "/usr/share/
if isinstance(
File "/usr/share/
return working_
File "/usr/share/
raise VersionConflict
VersionConflict: (anyjson 0.2.2 (/usr/share/
Storing complete log in ./pip-log.txt
Command "pip install -E .nova-venv -r tools/pip-requires" failed.
None
===
This is just outright annoying. The whole purpose of a virtualenv is to install packages into a virtual environment that don't necessarily match what's already on your system.
I feel there are a couple of issues with the current scripts:
1) There is really no need to have PIP be a dependency *before* creating the virtualenv. Right now, not having PIP will bomb out the install_virtenv.py script needlessly. PIP could be installed once the virtualenv is activated.
2) The run_tests.sh can be adapted to simply all the needed dependencies automatically if virtualenv is found and the .nova-venv directory does not exist. There's really no need to exit and make the user do it manually.
Related branches
- Eric Day (community): Approve
- Soren Hansen (community): Needs Fixing
- termie: Pending requested
-
Diff: 73 lines (+57/-3)1 file modifiedrun_tests.sh (+57/-3)
description: | updated |
Changed in nova: | |
importance: | Undecided → Low |
assignee: | nobody → Jay Pipes (jaypipes) |
status: | New → Fix Committed |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Note that a the installation won't work if the developer does not have python's development headers, since M2Crypto builds the extension manually and must link with Python.h.
Not sure how we can enforce this with the pip-requires file? Open to suggestions.