aboutsummaryrefslogtreecommitdiff
path: root/kokoro/release/python/windows/build_artifacts.bat
diff options
context:
space:
mode:
authorJan Tattermusch <jtattermusch@google.com>2018-09-07 12:32:20 -0700
committerJan Tattermusch <jtattermusch@google.com>2018-09-07 12:32:20 -0700
commit7200550afa99f422b45480005189338f4e0a9d8f (patch)
tree1ed4510b7b24531a2373137fc1c6bbee073cd684 /kokoro/release/python/windows/build_artifacts.bat
parent2e7563f40ec7f901ae8ae1cc749d701fa07e211d (diff)
downloadprotobuf-7200550afa99f422b45480005189338f4e0a9d8f.tar.gz
protobuf-7200550afa99f422b45480005189338f4e0a9d8f.tar.bz2
protobuf-7200550afa99f422b45480005189338f4e0a9d8f.zip
upport kokoro/release/python from 3.6.x branch
Diffstat (limited to 'kokoro/release/python/windows/build_artifacts.bat')
-rw-r--r--kokoro/release/python/windows/build_artifacts.bat53
1 files changed, 53 insertions, 0 deletions
diff --git a/kokoro/release/python/windows/build_artifacts.bat b/kokoro/release/python/windows/build_artifacts.bat
new file mode 100644
index 00000000..86270e6f
--- /dev/null
+++ b/kokoro/release/python/windows/build_artifacts.bat
@@ -0,0 +1,53 @@
+REM Move scripts to root
+cd github\protobuf
+copy kokoro\release\python\windows\build_single_artifact.bat build_single_artifact.bat
+
+REM Set environment variables
+set REPO_DIR=protobuf
+set PACKAGE_NAME=protobuf
+set BUILD_DLL=OFF
+set UNICODE=ON
+set PB_TEST_DEP="six==1.9"
+set OTHER_TEST_DEP="setuptools==38.5.1"
+set OLD_PATH=C:\Program Files (x86)\MSBuild\14.0\bin\;%PATH%
+for /f "tokens=*" %%i in ( 'grep -i "version" python/google/protobuf/__init__.py ^| grep -o "'.*'"' ) do set BUILD_VERSION=%%i
+set BUILD_COMMIT=v%BUILD_VERSION:'=%
+
+REM Fetch multibuild
+git clone https://github.com/matthew-brett/multibuild.git
+
+REM Install zlib
+mkdir zlib
+curl -L -o zlib.zip http://www.winimage.com/zLibDll/zlib123dll.zip
+curl -L -o zlib-src.zip http://www.winimage.com/zLibDll/zlib123.zip
+7z x zlib.zip -ozlib
+7z x zlib-src.zip -ozlib\include
+SET ZLIB_ROOT=%cd%\zlib
+del /Q zlib.zip
+del /Q zlib-src.zip
+
+REM Create directory for artifacts
+SET ARTIFACT_DIR=%cd%\artifacts
+mkdir %ARTIFACT_DIR%
+
+REM Build wheel
+
+SET PYTHON=C:\python35_32bit
+SET PYTHON_VERSION=3.5
+SET PYTHON_ARCH=32
+CALL build_single_artifact.bat
+
+SET PYTHON=C:\python35
+SET PYTHON_VERSION=3.5
+SET PYTHON_ARCH=64
+CALL build_single_artifact.bat
+
+SET PYTHON=C:\python36_32bit
+SET PYTHON_VERSION=3.6
+SET PYTHON_ARCH=32
+CALL build_single_artifact.bat
+
+SET PYTHON=C:\python36
+SET PYTHON_VERSION=3.6
+SET PYTHON_ARCH=64
+CALL build_single_artifact.bat