From 6a4e473d4ab40f60f719876fa0f72f4dcb2a5d37 Mon Sep 17 00:00:00 2001
From: "Nicolas \"Pixel\" Noble" <pixel@nobis-crew.org>
Date: Sat, 20 Feb 2016 01:30:57 +0100
Subject: [PATCH] 32 bits support.

---
 tools/run_tests/artifact_targets.py       | 11 ++++++++++-
 tools/run_tests/build_artifact_python.bat |  2 +-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/tools/run_tests/artifact_targets.py b/tools/run_tests/artifact_targets.py
index e106639bd1..b565fbb3f0 100644
--- a/tools/run_tests/artifact_targets.py
+++ b/tools/run_tests/artifact_targets.py
@@ -80,6 +80,11 @@ def macos_arch_env(arch):
   return {'CFLAGS': arch_arg, 'LDFLAGS': arch_arg}
 
 
+python_version_arch_map = {
+  'x86': 'Python27_32bits',
+  'x64': 'Python27'
+}
+
 class PythonArtifact:
   """Builds Python artifacts."""
 
@@ -88,6 +93,7 @@ class PythonArtifact:
     self.platform = platform
     self.arch = arch
     self.labels = ['artifact', 'python', platform, arch]
+    self.python_version = python_version_arch_map[arch]
 
   def pre_build_jobspecs(self):
       return []
@@ -103,7 +109,9 @@ class PythonArtifact:
           environ=environ)
     elif self.platform == 'windows':
       return create_jobspec(self.name,
-                            ['tools\\run_tests\\build_artifact_python.bat'],
+                            ['tools\\run_tests\\build_artifact_python.bat',
+                             self.python_version
+                            ],
                             shell=True)
     else:
       environ['SKIP_PIP_INSTALL'] = 'TRUE'
@@ -236,6 +244,7 @@ def targets():
           [PythonArtifact('linux', 'x86'),
            PythonArtifact('linux', 'x64'),
            PythonArtifact('macos', 'x64'),
+           PythonArtifact('windows', 'x86'),
            PythonArtifact('windows', 'x64'),
            RubyArtifact('linux', 'x86'),
            RubyArtifact('linux', 'x64'),
diff --git a/tools/run_tests/build_artifact_python.bat b/tools/run_tests/build_artifact_python.bat
index 4fc0749e70..023d394549 100644
--- a/tools/run_tests/build_artifact_python.bat
+++ b/tools/run_tests/build_artifact_python.bat
@@ -41,7 +41,7 @@ copy /Y vsprojects\Release\grpc_dll.dll src\python\grpcio\grpc\_cython\_windows\
 copy /Y vsprojects\x64\Release\grpc_dll.dll src\python\grpcio\grpc\_cython\_windows\grpc_c.64.python || goto :error
 
 
-set PATH=%PATH%;C:\Python27\scripts
+set PATH=C:\%1;C:\%1\scripts;%PATH%
 
 pip install --upgrade six
 pip install --upgrade setuptools
-- 
GitLab