| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 | @rem Copyright 2016 gRPC authors.@rem@rem Licensed under the Apache License, Version 2.0 (the "License");@rem you may not use this file except in compliance with the License.@rem You may obtain a copy of the License at@rem@rem     http://www.apache.org/licenses/LICENSE-2.0@rem@rem Unless required by applicable law or agreed to in writing, software@rem distributed under the License is distributed on an "AS IS" BASIS,@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.@rem See the License for the specific language governing permissions and@rem limitations under the License.@rem set path to pythonset PATH=C:\%1;C:\%1\scripts;%PATH%if "%1" == "Python27" goto :install_mingw64_with_msvcr90if "%1" == "Python27_32bit" goto :install_mingw64_with_msvcr90@rem set path to the existed mingw compilerset PATH=C:\msys64\mingw%2\bin;C:\tools\msys64\mingw%2\bin;%PATH%:end_mingw64_installationpython -m pip install --upgrade six@rem some artifacts are broken for setuptools 38.5.0. See https://github.com/grpc/grpc/issues/14317python -m pip install --upgrade setuptools==44.1.1python -m pip install --upgrade cythonpython -m pip install -rrequirements.txt --user@rem set GRPC_PYTHON_OVERRIDE_CYGWIN_DETECTION_FOR_27=1set GRPC_PYTHON_BUILD_WITH_CYTHON=1@rem Allow build_ext to build C/C++ files in parallel@rem by enabling a monkeypatch. It speeds up the build a lot.set GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS=4mkdir -p %ARTIFACTS_OUT%set ARTIFACT_DIR=%cd%\%ARTIFACTS_OUT%@rem Set up gRPC Python toolspython tools\distrib\python\make_grpcio_tools.py@rem Build gRPC Python extensionspython setup.py build_ext -c %EXT_COMPILER% || goto :errorpushd tools\distrib\python\grpcio_toolspython setup.py build_ext -c %EXT_COMPILER% || goto :errorpopd@rem Build gRPC Python distributionspython setup.py bdist_wheel || goto :errorpushd tools\distrib\python\grpcio_toolspython setup.py bdist_wheel || goto :errorpopd@rem Ensure the generate artifacts are valid.python -m pip install "twine<=2.0"python -m twine check dist\* tools\distrib\python\grpcio_tools\dist\* || goto :errorxcopy /Y /I /S dist\* %ARTIFACT_DIR% || goto :errorxcopy /Y /I /S tools\distrib\python\grpcio_tools\dist\* %ARTIFACT_DIR% || goto :errorgoto :EOF:errorpopdexit /b 1:install_mingw64_with_msvcr90set MSYS64_DOWNLOAD_URL=https://storage.googleapis.com/grpc-build-helper/msys64.zipset MSYS64_PATH=C:\tools\msys64_win7set PATH=%MSYS64_PATH%\mingw%2\bin;%PATH%@rem Skip the installation if the directory existsif exist "%MSYS64_PATH%" goto :end_mingw64_installationpython -m pip install requests || goto :errorpython tools\run_tests\python_utils\download_and_unzip.py "%MSYS64_DOWNLOAD_URL%" "%MSYS64_PATH%" || goto :errorgoto :end_mingw64_installation
 |