<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style='font-family: Verdana,Geneva,sans-serif'>
<p>On 2014-01-08 08:24, Doug Hellmann wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div dir="ltr">
<div class="gmail_default" style="font-size: small;"> </div>
<div class="gmail_extra"><br /><br />
<div class="gmail_quote">On Tue, Jan 7, 2014 at 12:32 PM, Ben Nemec <span><<a href="mailto:openstack@nemebean.com">openstack@nemebean.com</a>></span> wrote:<br />
<blockquote class="gmail_quote" style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;"><span style="text-decoration: underline;"></span>
<div style="font-family: Verdana,Geneva,sans-serif;">
<div class="im">
<p>On 2014-01-07 07:16, Doug Hellmann wrote:</p>
<blockquote style="padding-left: 5px; border-left: #1010ff 2px solid; margin-left: 5px;">
<div dir="ltr">
<div style="font-size: small;"> </div>
<div class="gmail_extra"><br /><br />
<div class="gmail_quote">On Tue, Jan 7, 2014 at 6:24 AM, Michael Kerrin <span><<a href="mailto:michael.kerrin@hp.com">michael.kerrin@hp.com</a>></span> wrote:<br />
<blockquote class="gmail_quote" style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;">
<div style="font-size: 9pt; font-weight: 400; font-style: normal;">
<p style="text-indent: 0px; margin: 0px;">I have been seeing this problem also.</p>
<p style="text-indent: 0px; margin: 0px;">My problem is actually with oslo.sphinx. I ran sudo pip install -r test-requirements.txt in cinder so that I could run the tests there, which installed oslo.sphinx.</p>
<p style="text-indent: 0px; margin: 0px;">Strange thing is that the oslo.sphinx installed a directory called oslo in /usr/local/lib/python2.7/dist-packages with no __init__.py file. With this package installed like so I get the same error you get with oslo.config.</p>
</div>
</blockquote>
<div> </div>
<div>
<div style="font-size: small;">The oslo libraries use python namespace packages, which manifest themselves as a directory in site-packages (or dist-packages) with sub-packages but no __init__.py(c). That way oslo.sphinx and oslo.config can be packaged separately, but still installed under the "oslo" directory and imported as oslo.sphinx and oslo.config.</div>
<div style="font-size: small;"> </div>
<div style="font-size: small;">My guess is that installing oslo.sphinx globally (with sudo), set up 2 copies of the namespace package (one in the global dist-packages and presumably one in the virtualenv being used for the tests).</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div>
<div>Actually I think it may be the opposite problem, at least where I'm currently running into this. oslo.sphinx is only installed in the venv and it creates a namespace package there. Then if you try to load oslo.config in the venv it looks in the namespace package, doesn't find it, and bails with a missing module error.</div>
<div> </div>
<div>I'm personally running into this in tempest - I can't even run pep8 out of the box because the sample config check fails due to missing oslo.config. Here's what I'm seeing:</div>
<div> </div>
<div>In the tox venv:</div>
<div>(pep8)[fedora@devstack site-packages]$ ls oslo*<br />oslo.sphinx-1.1-py2.7-nspkg.pth<br /><br />oslo:<br />sphinx<br /><br />oslo.sphinx-1.1-py2.7.egg-info:<br />dependency_links.txt namespace_packages.txt PKG-INFO top_level.txt<br /> installed-files.txt not-zip-safe SOURCES.txt</div>
<div> </div>
<div> </div>
<div>And in the system site-packages:</div>
<div>[fedora@devstack site-packages]$ ls oslo*<br />oslo.config.egg-link oslo.messaging.egg-link</div>
<div> </div>
<div> </div>
<div>Since I don't actually care about oslo.sphinx in this case, I also found that deleting it from the venv fixes the problem, but obviously that's just a hacky workaround. My initial thought is to install oslo.sphinx in devstack the same way as oslo.config and oslo.messaging, but I assume there's a reason we didn't do it that way in the first place so I'm not sure if that will work.</div>
<div> </div>
<div>So I don't know what the proper fix is, but I thought I'd share what I've found so far. Also, I'm not sure if this even relates to the ceilometer issue since I wouldn't expect that to be running in a venv, but it may have a similar issue.</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<div> </div>
<div>
<div class="gmail_default" style="font-size: small;">I wonder if the issue is actually that we're using "pip install -e" for oslo.config and oslo.messaging (as evidenced by the .egg-link files). Do things work properly if those packages are installed to the global site-packages from PyPI instead? We don't want to change the way devstack installs them, but it would give us another data point.</div>
<div class="gmail_default" style="font-size: small;"> </div>
<div class="gmail_default" style="font-size: small;">Another solution is to have a list of dependencies needed for building documentation, separate from the tests, since oslo.sphinx isn't needed for the tests.</div>
<div class="gmail_default" style="font-size: small;"> </div>
</div>
</div>
</div>
</div>
</blockquote>
<p><br />It does work if I remove the pip install -e version of oslo.config and reinstall from the pypi package, so this appears to be an issue with the egg-links.</p>
<p>-Ben</p>
<div> </div>
</body></html>