[tox] ImportError: No module named config
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When trying and running tox on Nova, tests are failing because of missing oslo.config package.
Although oslo.config is specified in the requirements.txt file and pip seems to be successfull in installing oslo.config, the directory where it should be isn't created.
I'm using Nova trunk version 23a0bea232b42df
Here's my trace:
(cleanenv)
argparse==1.2.1
wsgiref==0.1.2
(cleanenv)
Already up-to-date.
(cleanenv)
p srvadmin-oslog - Dell OpenManage Server Administrator OS Logging Control
(cleanenv)
(cleanenv)
py27 create: /opt/stack/
py27 installdeps: -r/opt/
py27 develop-inst: /opt/stack/nova
py27 runtests: commands[0] | python -m nova.openstack.
Traceback (most recent call last):
File "/usr/lib/
"__main__", fname, loader, pkg_name)
File "/usr/lib/
exec code in run_globals
File "/opt/stack/
from oslo.config import cfg
ImportError: No module named config
ERROR: InvocationError: '/opt/stack/
_______
ERROR: py27: commands failed
(cleanenv)
.tox/py27/
.tox/py27/
.tox/py27/
.tox/py27/
.tox/py27/
(cleanenv)
rootwrap sphinx
(cleanenv)
(py27)ubuntu@
-e git+https:/
(py27)ubuntu@
oslo.config>=1.2.0
(py27)ubuntu@
Changed in nova: | |
assignee: | nobody → Florent Flament (florent-flament-ext) |
Changed in nova: | |
assignee: | Florent Flament (florent-flament-ext) → nobody |
Changed in nova: | |
status: | In Progress → Triaged |
Changed in nova: | |
milestone: | none → juno-rc1 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | juno-rc1 → 2014.2 |
The issue is due to Nova's tox.ini using site packages (sitepackages=True) /github. com/openstack/ nova/blob/ master/ tox.ini# L7
https:/
With this option, we loose some of the benefits of virtualenv, consisting in isolating packages between the environment where tests are launched and site's packages.
For instance, other Openstack projects tox.ini don't use site packages. /github. com/openstack/ keystone/ blob/master/ tox.ini# L6 /github. com/openstack/ cinder/ blob/master/ tox.ini# L6
https:/
https:/