Please refer to #2694 and #2670 for motivation and reasoning for
this change.
I've tried to follow best practice in inserting the copyright
headers. In other open source projects, not all files carry
the notice. For example documentation doesn't. I've followed
similar ground rules.
I did not change the php because there is a separate LICENSE
file there by Pixel Federation. We'll first need to notify
them our intent before changing anything there.
As for the presubmit check, it's going to be non-trivial
because of the number of exceptions, like file types,
directories and generated code. So, it will have to be
a separate project.
This type of installation is used when generating the bootstrap images.
The variable "PIP" was not defined. We recently changed that script to allow for binaries "pip2" on systems where Python 3 is the default.
Fixes issue in Debian Jessie.
Removed force upgrade of "virtualenv" because the current version is good enough.
make docker_bootstrap passes after this change.
Since gRPC 0.13, the gRPC Python install process takes care of downloading python modules like "six" or "google.protobuf".
The new install process also no longer requires "tox", hence we dropped that dependency as well.
This commit also fixes the issue which was introduced in commit 938f31743d.
When we changed the install command flag for protobuf python from --root to --prefix, a system wide python package would always trump the locally installed version. Due to that, we could no longer run the e2e tests on our desktops. Since we no longer manually install protobuf python, this issue goes away. Before I had that solution, I did some analysis why the system wide version gets imported instead of the local version.
If --prefix is used, protobuf python is installed as an .egg file in the "site-packages" directory.
If --root is used, the .py files are copied to the "dist-packages" directory instead.
For unknown reasons, the .egg file in "site-packages" was not used when calling "import google.protobuf".
Here's what it looked like:
--prefix: (not working)
$ python -v
>>> import google.protobuf
[...]
import google # loaded from Zip /home/mberlin/workspace/vitess/dist/grpc/usr/local/lib/python2.7/site-packages/protobuf-3.0.0b2-py2.7-linux-x86_64.egg/google/__init__.pyc
import google.protobuf # directory /usr/lib/python2.7/dist-packages/google/protobuf
import google.protobuf # precompiled from /usr/lib/python2.7/dist-packages/google/protobuf/__init__.pyc
>>>
--root: (working)
$ python -v
>>> import google.protobuf
import google.protobuf # directory /home/mberlin/workspace/vitess/dist/grpc/usr/local/lib/python2.7/dist-packages/google/protobuf
import google.protobuf # precompiled from /home/mberlin/workspace/vitess/dist/grpc/usr/local/lib/python2.7/dist-packages/google/protobuf/__init__.pyc
>>>
Updating protobuf to v3.0.0-alpha-2 (to match gRPC's version)
Now the python vtctl client works as expected (!!!).
Also splitting up go and python vtctl client implementations
(will be used inside google3).