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-ldshared.patch b/dev-lang/python/files/python-2.7.10-ldshared.patch
new file mode 100644
index 0000000..443bf65
--- /dev/null
+++ b/dev-lang/python/files/python-2.7.10-ldshared.patch
@@ -0,0 +1,19 @@
+This fixes the problem that when CC is set, the LDSHAREd is not
+set accordingly on linux.
+Upstream bug filed at https://bugs.python.org/issue24935
+
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -180,10 +180,10 @@
+
+ if 'CC' in os.environ:
+ newcc = os.environ['CC']
+- if (sys.platform == 'darwin'
++ if ((sys.platform == 'darwin' or sys.platform.startswith('linux'))
+ and 'LDSHARED' not in os.environ
+ and ldshared.startswith(cc)):
+- # On OS X, if CC is overridden, use that as the default
++ # On OS X and linux, if CC is overridden, use that as the default
+ # command for LDSHARED as well
+ ldshared = newcc + ldshared[len(cc):]
+ cc = newcc