[ovs-discuss] any help from Python experts? (was: Re: Branch v2.6.1 repo does not make (github))
blp at ovn.org
Tue Jan 31 23:45:48 UTC 2017
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', ...
where /usr/lib/python2.7/dist-packages is the distro's Python package
installation directory, which is where the python-openvswitch package
installs its .py files. This has the effect that these installed files
override the ones in the source directory.
Python experts, what's the best way to get $(srcdir)/python ahead of
/usr/lib/python2.7/dist-packages in sys.path?
On Sun, Jan 29, 2017 at 05:16:29PM +0000, Logu J wrote:
> Thanks for the tip. make succeeded after removing 'python-openvswitch'
> ubuntu at sdnhubvm:openvswitch[22:32] (master)$ dpkg -l | grep openvswitch
> rc openvswitch-controller 2.0.1+git20140120-0ubuntu2
> amd64 Open vSwitch controller implementation
> ii openvswitch-datapath-source 2.3.90-1
> all Open vSwitch datapath module source - module-assistant
> rc openvswitch-ipsec 2.1.0-1
> amd64 Open vSwitch GRE-over-IPsec support
> rc openvswitch-pki 2.3.90-1
> all Open vSwitch public key infrastructure dependency
> rc openvswitch-switch 2.3.90-1
> amd64 Open vSwitch switch implementations
> rc openvswitch-vtep 2.1.0-1
> amd64 Open vSwitch VTEP utilities
> ii python-openvswitch 2.3.90-1
> all Python bindings for Open vSwitch
> On Sun, Jan 29, 2017 at 10:16 AM Ben Pfaff <blp at ovn.org> wrote:
> Perhaps you have some old version of the Python libraries for Open
> vSwitch installed somewhere? In older versions of OVS, the function in
> question did have fewer arguments.
> I don't know why a system installation of a Python library would
> override the version in the OVS tree. Probably need help from a Python
> expert on that.
> On Sun, Jan 29, 2017 at 03:27:52AM +0000, Logu J wrote:
> > Ben,
> > checked out latest code from github and compiling.
> > I was getting same error on master branch, so I was trying to compile with
> > v2.6.1. Thanks for pointing out my mistake.
> > Now I switched to v2.6.1 with 'git checkout tags/v2.6.1', still make fails
> > with same error. (I've attached make terminal output).
> > My environment:
> > ubuntu at sdnhubvm:openvswitch[08:50] ((detached from v2.6.1))$ lsb_release
> > No LSB modules are available.
> > Distributor ID: Ubuntu
> > Description: *Ubuntu 14.04.5 LTS*
> > Release: 14.04
> > Codename: trusty
> > ubuntu at sdnhubvm:openvswitch[08:50] ((detached from v2.6.1))$ uname -a
> > Linux sdnhubvm *3.13.0-24-generic* #47-Ubuntu SMP Fri May 2 23:30:00 UTC
> > 2014 x86_64 x86_64 x86_64 GNU/Linux
> > ubuntu at sdnhubvm:openvswitch[08:50] ((detached from v2.6.1))$ gcc --version
> > *gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4*
> > Copyright (C) 2013 Free Software Foundation, Inc.
> > This is free software; see the source for copying conditions. There is NO
> > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
> > Regards,
> > Logu
> > On Sat, Jan 28, 2017 at 11:33 PM Ben Pfaff <blp at ovn.org> wrote:
> > > On Sat, Jan 28, 2017 at 03:36:22AM +0000, Logu J wrote:
> > > > I'm stuck at below error (on Ubuntu 14.04.5 LTS). Any clue please?
> > > >
> > > > ubuntu at sdnhubvm:openvswitch[09:00] (master)$ git checkout -b v2.6.1
> > > > Switched to a new branch 'v2.6.1'
> > >
> > > You were on master, which is presumably a clone of the OVS master
> > > branch, and then you typed "git checkout -b v2.6.1". This does not
> > > switch to v2.6.1 or to any other commit or branch or tag. Rather, it
> > > creates a new branch from the *current* commit, which is presumably some
> > > commit along the OVS master branch. So this bug report is probably not
> > > for v2.6.1 or even for branch-2.6 (the OVS 2.6.x branch).
> > >
> > > What commit did you actually compile?
> > >
More information about the discuss