blob: 3a0564129cfd3d2d8c268ea1e1efd171252602a9 [file] [log] [blame]
Jan Tattermusch7897ae92017-06-07 22:57:36 +02001@rem Copyright 2016 gRPC authors.
Nicolas "Pixel" Noblede808bb2016-02-18 01:13:14 +01002@rem
Jan Tattermusch7897ae92017-06-07 22:57:36 +02003@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" Noblede808bb2016-02-18 01:13:14 +01006@rem
Jan Tattermusch7897ae92017-06-07 22:57:36 +02007@rem http://www.apache.org/licenses/LICENSE-2.0
Nicolas "Pixel" Noblede808bb2016-02-18 01:13:14 +01008@rem
Jan Tattermusch7897ae92017-06-07 22:57:36 +02009@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" Noblede808bb2016-02-18 01:13:14 +010014
Jan Tattermuscha2eb6f72017-07-18 15:13:14 +020015@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%
Nicolas "Pixel" Noblede808bb2016-02-18 01:13:14 +010017
18pip install --upgrade six
19pip install --upgrade setuptools
20pip install -rrequirements.txt
21
Masood Malekghassemi639bb392016-06-05 17:04:44 -070022set GRPC_PYTHON_BUILD_WITH_CYTHON=1
Ken Paysonc9b7ad02016-06-23 02:38:20 -070023
Jan Tattermusch47c75212017-04-21 13:27:42 +020024mkdir -p %ARTIFACTS_OUT%
25set ARTIFACT_DIR=%cd%\%ARTIFACTS_OUT%
Ken Paysonc9b7ad02016-06-23 02:38:20 -070026
Masood Malekghassemi639bb392016-06-05 17:04:44 -070027@rem Set up gRPC Python tools
Masood Malekghassemi751fbb02016-05-04 16:12:56 -070028python tools\distrib\python\make_grpcio_tools.py
Masood Malekghassemi639bb392016-06-05 17:04:44 -070029
30@rem Build gRPC Python extensions
Ken Payson5998cd72016-08-10 15:39:43 -070031python setup.py build_ext -c %EXT_COMPILER% || goto :error
Masood Malekghassemic089a582016-07-15 23:40:32 -070032
33pushd tools\distrib\python\grpcio_tools
Ken Payson5998cd72016-08-10 15:39:43 -070034python setup.py build_ext -c %EXT_COMPILER% || goto :error
Masood Malekghassemic089a582016-07-15 23:40:32 -070035popd
36
Masood Malekghassemi639bb392016-06-05 17:04:44 -070037@rem Build gRPC Python distributions
Ken Payson5998cd72016-08-10 15:39:43 -070038python setup.py bdist_wheel || goto :error
Masood Malekghassemic089a582016-07-15 23:40:32 -070039
40pushd tools\distrib\python\grpcio_tools
Ken Payson5998cd72016-08-10 15:39:43 -070041python setup.py bdist_wheel || goto :error
Masood Malekghassemic089a582016-07-15 23:40:32 -070042popd
43
Ken Payson5998cd72016-08-10 15:39:43 -070044xcopy /Y /I /S dist\* %ARTIFACT_DIR% || goto :error
45xcopy /Y /I /S tools\distrib\python\grpcio_tools\dist\* %ARTIFACT_DIR% || goto :error
46
Nicolas "Pixel" Noblede808bb2016-02-18 01:13:14 +010047goto :EOF
48
49:error
Ken Payson5998cd72016-08-10 15:39:43 -070050popd
Nicolas "Pixel" Noblede808bb2016-02-18 01:13:14 +010051exit /b 1