diff --git a/tools/internal_ci/windows/grpc_build_artifacts.bat b/tools/internal_ci/windows/grpc_build_artifacts.bat index 6dca2f72c171fcce5676aa0c01440d60530baf0b..d5ade5a83d5bf3be6fb6ca8096118c538803cd1a 100644 --- a/tools/internal_ci/windows/grpc_build_artifacts.bat +++ b/tools/internal_ci/windows/grpc_build_artifacts.bat @@ -12,6 +12,13 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. +@rem Move python installation from _32bit to _32bits where they are expected python artifact builder +@rem TODO(jtattermusch): get rid of this hack +rename C:\Python27_32bit Python27_32bits +rename C:\Python34_32bit Python34_32bits +rename C:\Python35_32bit Python35_32bits +rename C:\Python36_32bit Python36_32bits + @rem make sure msys binaries are preferred over cygwin binaries @rem set path to python 2.7 set PATH=C:\tools\msys64\usr\bin;C:\Python27;%PATH% diff --git a/tools/run_tests/artifacts/artifact_targets.py b/tools/run_tests/artifacts/artifact_targets.py index 50d85c66739503868c702fd4b4f473eb9515180d..be70b8c583cd1968aaeb61d3f152fd69d1c73888 100644 --- a/tools/run_tests/artifacts/artifact_targets.py +++ b/tools/run_tests/artifacts/artifact_targets.py @@ -148,9 +148,7 @@ class PythonArtifact: return create_jobspec(self.name, ['tools\\run_tests\\artifacts\\build_artifact_python.bat', self.py_version, - '32' if self.arch == 'x86' else '64', - dir - ], + '32' if self.arch == 'x86' else '64'], environ=environ, use_workspace=True) else: diff --git a/tools/run_tests/artifacts/build_artifact_python.bat b/tools/run_tests/artifacts/build_artifact_python.bat index 6f81f3c211c49f59aed0aa1144e5f7ae13937eb0..4c34fc50f0400a596493c8b2a0ceca5d4a52c5c9 100644 --- a/tools/run_tests/artifacts/build_artifact_python.bat +++ b/tools/run_tests/artifacts/build_artifact_python.bat @@ -21,16 +21,8 @@ pip install -rrequirements.txt set GRPC_PYTHON_BUILD_WITH_CYTHON=1 -@rem Multiple builds are running simultaneously, so to avoid distutils -@rem file collisions, we build everything in a tmp directory -@rem TODO(jtattermusch): it doesn't look like builds are actually running in parallel in the same dir mkdir -p %ARTIFACTS_OUT% set ARTIFACT_DIR=%cd%\%ARTIFACTS_OUT% -set BUILD_DIR=C:\Windows\Temp\pygrpc-%3\ -mkdir %BUILD_DIR% -xcopy /s/e/q %cd%\* %BUILD_DIR% -pushd %BUILD_DIR% - @rem Set up gRPC Python tools python tools\distrib\python\make_grpcio_tools.py @@ -49,16 +41,11 @@ pushd tools\distrib\python\grpcio_tools python setup.py bdist_wheel || goto :error popd - xcopy /Y /I /S dist\* %ARTIFACT_DIR% || goto :error xcopy /Y /I /S tools\distrib\python\grpcio_tools\dist\* %ARTIFACT_DIR% || goto :error -popd -rmdir /s /q %BUILD_DIR% - goto :EOF :error popd -rmdir /s /q %BUILD_DIR% exit /b 1 diff --git a/tools/run_tests/artifacts/build_artifact_python.sh b/tools/run_tests/artifacts/build_artifact_python.sh index c686cc46937bf19952e6a2ed9ba54bdd2ae909a5..ab5bce04f9551ace512863474901b13707e579d3 100755 --- a/tools/run_tests/artifacts/build_artifact_python.sh +++ b/tools/run_tests/artifacts/build_artifact_python.sh @@ -23,16 +23,8 @@ export PYTHON=${PYTHON:-python} export PIP=${PIP:-pip} export AUDITWHEEL=${AUDITWHEEL:-auditwheel} -# Because multiple builds run in parallel, some distutils file -# operations may collide. To avoid this, each build is run in -# a temp directory -# TODO(jtattermusch): it doesn't look like builds are actually running in parallel in the same dir mkdir -p "${ARTIFACTS_OUT}" ARTIFACT_DIR="$PWD/${ARTIFACTS_OUT}" -BUILD_DIR=`mktemp -d "${TMPDIR:-/tmp}/pygrpc.XXXXXX"` -trap "rm -rf $BUILD_DIR" EXIT -cp -r * "$BUILD_DIR" -cd "$BUILD_DIR" # Build the source distribution first because MANIFEST.in cannot override # exclusion of built shared objects among package resources (for some