On Wed, Feb 01, 2017 at 09:45:56AM -0500, Robert Wojciechowicz wrote: > On Tue, Jan 31, 2017 at 03:45:48PM -0800, Ben Pfaff wrote: > > OK, so looking closer... > > > > The OVS build process runs a few Python programs using syntax like this: > > PYTHONPATH=$(srcdir)/python:$(PYTHONPATH) python program.py > > > > This means that sys.path ends up looking like: > > > > ['/dir/for/program.py', ..., '/usr/lib/python2.7/dist-packages', ... > > '$(srcdir)/python', ...] > > Not really, sys.path is initialized by current working dir, PYTHONPATH > and then followed by installation-dependent default paths.
You make it sound like I'm making this up! But my remarks were based on observation. Here's a simple example: blp@sigabrt:~/nicira/ovs/_build(0)$ PYTHONPATH=$PWD/python python Python 2.7.13 (default, Dec 18 2016, 20:19:42) [GCC 6.2.1 20161215] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> print sys.path ['', '/home/blp/.local/lib/python2.7/site-packages/p4_hlir-0.9.30-py2.7.egg', '/usr/lib/python2.7/dist-packages', '/home/blp/.local/lib/python2.7/site-packages/p4c_behavioral-0.9.4-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/PyYAML-3.11-py2.7-linux-x86_64.egg', '/home/blp/.local/lib/python2.7/site-packages/protobuf-3.0.0b3-py2.7.egg', '/home/blp/nicira/ovs/_build/python', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-i386-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/home/blp/.local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7'] >>> As you can see, /usr/lib/python2.7/dist-packages is well ahead of /home/blp/nicira/ovs/_build/python. Why does your Python act different from mine in this respect? _______________________________________________ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss