On 30 September 2014 14:05, Robert Collins <robe...@robertcollins.net> wrote:

> I'm poking around now. It looks like pip install -e outside a venv
> writes to /usr/local/lib/python2.7/dist-packages, which is pure crack
> - dist-packages is for the distro, site-packages for pip. Sigh. Also
> writing to /usr/local/lib when the python prefix is /usr. More
> weirdness.
> Will be back with more soon :)

So, I've pushed up an updated oslo.db patch that works in the wider
set of situations we've identified. I've attached my test script
(adjust as needed - be sure to use the updated pbr and the oslo tree
from github and adjust paths as needed :)).

The basic theory in this particular implementation boils down to this:
 - within distro packages, things are installed as normal, its a no-brainer.
 - within a venv, pip can happily ignore any dependent namespace
packages it cannot import and just install them
   so the failure mode on things we can't import is that we install
them in the venv as well
 - but we add the namespace site packages when working from the
working directory, so that we can pick those things up [but we could
just ignore them and pip install them]

I think there is one remaining flaw, which is that I haven't written
the code to *not* add system site (turns out python doesn't really
expose that in a standard fashion) - but I think that can wait for
some folk to beat on this and report whether it works for them too.


Robert Collins <rbtcoll...@hp.com>
Distinguished Technologist
HP Converged Cloud

Attachment: test-oslo
Description: Binary data

OpenStack-dev mailing list

Reply via email to