1@rem Copyright 2016 gRPC authors. 2@rem 3@rem Licensed under the Apache License, Version 2.0 (the "License"); 4@rem you may not use this file except in compliance with the License. 5@rem You may obtain a copy of the License at 6@rem 7@rem http://www.apache.org/licenses/LICENSE-2.0 8@rem 9@rem Unless required by applicable law or agreed to in writing, software 10@rem distributed under the License is distributed on an "AS IS" BASIS, 11@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12@rem See the License for the specific language governing permissions and 13@rem limitations under the License. 14 15@rem set path to python & mingw compiler 16set PATH=C:\%1;C:\%1\scripts;C:\msys64\mingw%2\bin;C:\tools\msys64\mingw%2\bin;%PATH% 17 18pip install --upgrade six 19@rem some artifacts are broken for setuptools 38.5.0. See https://github.com/grpc/grpc/issues/14317 20pip install --upgrade setuptools==38.2.4 21pip install -rrequirements.txt 22 23set GRPC_PYTHON_BUILD_WITH_CYTHON=1 24 25mkdir -p %ARTIFACTS_OUT% 26set ARTIFACT_DIR=%cd%\%ARTIFACTS_OUT% 27 28@rem Set up gRPC Python tools 29python tools\distrib\python\make_grpcio_tools.py 30 31@rem Build gRPC Python extensions 32python setup.py build_ext -c %EXT_COMPILER% || goto :error 33 34pushd tools\distrib\python\grpcio_tools 35python setup.py build_ext -c %EXT_COMPILER% || goto :error 36popd 37 38@rem Build gRPC Python distributions 39python setup.py bdist_wheel || goto :error 40 41pushd tools\distrib\python\grpcio_tools 42python setup.py bdist_wheel || goto :error 43popd 44 45xcopy /Y /I /S dist\* %ARTIFACT_DIR% || goto :error 46xcopy /Y /I /S tools\distrib\python\grpcio_tools\dist\* %ARTIFACT_DIR% || goto :error 47 48goto :EOF 49 50:error 51popd 52exit /b 1 53