Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 1 | @rem Copyright 2016 gRPC authors. |
Nicolas "Pixel" Noble | de808bb | 2016-02-18 01:13:14 +0100 | [diff] [blame] | 2 | @rem |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 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 |
Nicolas "Pixel" Noble | de808bb | 2016-02-18 01:13:14 +0100 | [diff] [blame] | 6 | @rem |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 7 | @rem http://www.apache.org/licenses/LICENSE-2.0 |
Nicolas "Pixel" Noble | de808bb | 2016-02-18 01:13:14 +0100 | [diff] [blame] | 8 | @rem |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 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. |
Nicolas "Pixel" Noble | de808bb | 2016-02-18 01:13:14 +0100 | [diff] [blame] | 14 | |
Jan Tattermusch | a2eb6f7 | 2017-07-18 15:13:14 +0200 | [diff] [blame] | 15 | @rem set path to python & mingw compiler |
| 16 | set PATH=C:\%1;C:\%1\scripts;C:\msys64\mingw%2\bin;C:\tools\msys64\mingw%2\bin;%PATH% |
Nicolas "Pixel" Noble | de808bb | 2016-02-18 01:13:14 +0100 | [diff] [blame] | 17 | |
| 18 | pip install --upgrade six |
| 19 | pip install --upgrade setuptools |
| 20 | pip install -rrequirements.txt |
| 21 | |
Masood Malekghassemi | 639bb39 | 2016-06-05 17:04:44 -0700 | [diff] [blame] | 22 | set GRPC_PYTHON_BUILD_WITH_CYTHON=1 |
Ken Payson | c9b7ad0 | 2016-06-23 02:38:20 -0700 | [diff] [blame] | 23 | |
Jan Tattermusch | 47c7521 | 2017-04-21 13:27:42 +0200 | [diff] [blame] | 24 | mkdir -p %ARTIFACTS_OUT% |
| 25 | set ARTIFACT_DIR=%cd%\%ARTIFACTS_OUT% |
Ken Payson | c9b7ad0 | 2016-06-23 02:38:20 -0700 | [diff] [blame] | 26 | |
Masood Malekghassemi | 639bb39 | 2016-06-05 17:04:44 -0700 | [diff] [blame] | 27 | @rem Set up gRPC Python tools |
Masood Malekghassemi | 751fbb0 | 2016-05-04 16:12:56 -0700 | [diff] [blame] | 28 | python tools\distrib\python\make_grpcio_tools.py |
Masood Malekghassemi | 639bb39 | 2016-06-05 17:04:44 -0700 | [diff] [blame] | 29 | |
| 30 | @rem Build gRPC Python extensions |
Ken Payson | 5998cd7 | 2016-08-10 15:39:43 -0700 | [diff] [blame] | 31 | python setup.py build_ext -c %EXT_COMPILER% || goto :error |
Masood Malekghassemi | c089a58 | 2016-07-15 23:40:32 -0700 | [diff] [blame] | 32 | |
| 33 | pushd tools\distrib\python\grpcio_tools |
Ken Payson | 5998cd7 | 2016-08-10 15:39:43 -0700 | [diff] [blame] | 34 | python setup.py build_ext -c %EXT_COMPILER% || goto :error |
Masood Malekghassemi | c089a58 | 2016-07-15 23:40:32 -0700 | [diff] [blame] | 35 | popd |
| 36 | |
Masood Malekghassemi | 639bb39 | 2016-06-05 17:04:44 -0700 | [diff] [blame] | 37 | @rem Build gRPC Python distributions |
Ken Payson | 5998cd7 | 2016-08-10 15:39:43 -0700 | [diff] [blame] | 38 | python setup.py bdist_wheel || goto :error |
Masood Malekghassemi | c089a58 | 2016-07-15 23:40:32 -0700 | [diff] [blame] | 39 | |
| 40 | pushd tools\distrib\python\grpcio_tools |
Ken Payson | 5998cd7 | 2016-08-10 15:39:43 -0700 | [diff] [blame] | 41 | python setup.py bdist_wheel || goto :error |
Masood Malekghassemi | c089a58 | 2016-07-15 23:40:32 -0700 | [diff] [blame] | 42 | popd |
| 43 | |
Ken Payson | 5998cd7 | 2016-08-10 15:39:43 -0700 | [diff] [blame] | 44 | xcopy /Y /I /S dist\* %ARTIFACT_DIR% || goto :error |
| 45 | xcopy /Y /I /S tools\distrib\python\grpcio_tools\dist\* %ARTIFACT_DIR% || goto :error |
| 46 | |
Nicolas "Pixel" Noble | de808bb | 2016-02-18 01:13:14 +0100 | [diff] [blame] | 47 | goto :EOF |
| 48 | |
| 49 | :error |
Ken Payson | 5998cd7 | 2016-08-10 15:39:43 -0700 | [diff] [blame] | 50 | popd |
Nicolas "Pixel" Noble | de808bb | 2016-02-18 01:13:14 +0100 | [diff] [blame] | 51 | exit /b 1 |