diff options
author | 2016-08-25 08:18:25 -0700 | |
---|---|---|
committer | 2016-08-25 08:18:25 -0700 | |
commit | f03b112d12d32f42b023a5c49d994438dde0a95e (patch) | |
tree | 979d4e64ecf7ed31495d635ea4caa7c037284f72 /tools/run_tests/build_artifact_python.bat | |
parent | 7187ab9866f95181212cdb8b80fcbe0a36b01765 (diff) | |
parent | 19ea0cffd7ba3df686ed05671f9ed35b8e9fa830 (diff) |
Merge remote-tracking branch 'upstream/master' into cq_verifier_file_line
Diffstat (limited to 'tools/run_tests/build_artifact_python.bat')
-rw-r--r-- | tools/run_tests/build_artifact_python.bat | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/tools/run_tests/build_artifact_python.bat b/tools/run_tests/build_artifact_python.bat index 074a3c6781..246713a6ce 100644 --- a/tools/run_tests/build_artifact_python.bat +++ b/tools/run_tests/build_artifact_python.bat @@ -36,31 +36,43 @@ 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 +if not exist "artifacts" mkdir "artifacts" +set ARTIFACT_DIR=%cd%\artifacts +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 @rem Build gRPC Python extensions -python setup.py build_ext -c mingw32 +python setup.py build_ext -c %EXT_COMPILER% || goto :error pushd tools\distrib\python\grpcio_tools -python setup.py build_ext -c mingw32 +python setup.py build_ext -c %EXT_COMPILER% || goto :error popd - @rem Build gRPC Python distributions -python setup.py bdist_wheel +python setup.py bdist_wheel || goto :error pushd tools\distrib\python\grpcio_tools -python setup.py bdist_wheel +python setup.py bdist_wheel || goto :error popd -mkdir artifacts -xcopy /Y /I /S dist\* artifacts\ || goto :error -xcopy /Y /I /S tools\distrib\python\grpcio_tools\dist\* artifacts\ || goto :error +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 |