python: update to 2.7.10 [reland]

New ebuild is derived from Gentoo's 2.7.10 ebuild by copying
ChromiumOS-specific changes from the old ebuild and adapting
ChrmiumOS-specific patches.

The new depot_tools update has landed and seems to be stable,
so we should be able to land this now too.

BUG=b:22248294
TEST=Trybot succeeded on chromiumos-sdk, arm-generic, x86-generic and amd64-generic.

Change-Id: I67852de865a386415ae3698853d4ff557e99c88d
Reviewed-on: https://chromium-review.googlesource.com/313800
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Andrey Ulanov <andreyu@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/dev-lang/python/files/python-2.7.10-cross-hack-compiler.patch b/dev-lang/python/files/python-2.7.10-cross-hack-compiler.patch
new file mode 100644
index 0000000..4fe77de
--- /dev/null
+++ b/dev-lang/python/files/python-2.7.10-cross-hack-compiler.patch
@@ -0,0 +1,25 @@
+Remove local python modules from the search path when running the compiler.
+
+The python build will invoke python with a custom PYTHONPATH (pointing to
+local libs) which will mess up any python scripts we execute, like our
+compiler wrapper.
+
+We can't create wrappers and point the build at those because python will
+record the values for CC/CXX and write it out to its installed modules, and
+those values will be loaded later when cross-compiling other python packages.
+
+This hack is kind of terrible, but so are many of the alternatives.
+
+--- a/setup.py
++++ a/setup.py
+@@ -46,6 +46,10 @@
+     disable_ssl = 0
+  
+ 
++for v in ('CC', 'CXX', 'LDSHARED'):
++    if v in os.environ:
++        os.environ[v] = 'env -u PYTHONPATH ' + os.environ[v]
++
+ exit_status = 0
+ 
+ def add_dir_to_list(dirlist, dir):