build_artifacts.bat 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. REM Move scripts to root
  2. cd github\protobuf
  3. copy kokoro\release\python\windows\build_single_artifact.bat build_single_artifact.bat
  4. REM Set environment variables
  5. set REPO_DIR=protobuf
  6. set PACKAGE_NAME=protobuf
  7. set BUILD_DLL=OFF
  8. set UNICODE=ON
  9. set PB_TEST_DEP="six==1.9"
  10. set OTHER_TEST_DEP="setuptools==38.5.1"
  11. set OLD_PATH=C:\Program Files (x86)\MSBuild\14.0\bin\;%PATH%
  12. for /f "tokens=*" %%i in ( 'grep -i "version" python/google/protobuf/__init__.py ^| grep -o "'.*'"' ) do set BUILD_VERSION=%%i
  13. set BUILD_COMMIT=v%BUILD_VERSION:'=%
  14. REM Fetch multibuild
  15. git clone https://github.com/matthew-brett/multibuild.git
  16. REM Install zlib
  17. mkdir zlib
  18. curl -L -o zlib.zip http://www.winimage.com/zLibDll/zlib123dll.zip
  19. curl -L -o zlib-src.zip http://www.winimage.com/zLibDll/zlib123.zip
  20. 7z x zlib.zip -ozlib
  21. 7z x zlib-src.zip -ozlib\include
  22. SET ZLIB_ROOT=%cd%\zlib
  23. del /Q zlib.zip
  24. del /Q zlib-src.zip
  25. REM Create directory for artifacts
  26. SET ARTIFACT_DIR=%cd%\artifacts
  27. mkdir %ARTIFACT_DIR%
  28. REM Build wheel
  29. SET PYTHON=C:\python35_32bit
  30. SET PYTHON_VERSION=3.5
  31. SET PYTHON_ARCH=32
  32. CALL build_single_artifact.bat
  33. SET PYTHON=C:\python35
  34. SET PYTHON_VERSION=3.5
  35. SET PYTHON_ARCH=64
  36. CALL build_single_artifact.bat
  37. SET PYTHON=C:\python36_32bit
  38. SET PYTHON_VERSION=3.6
  39. SET PYTHON_ARCH=32
  40. CALL build_single_artifact.bat
  41. SET PYTHON=C:\python36
  42. SET PYTHON_VERSION=3.6
  43. SET PYTHON_ARCH=64
  44. CALL build_single_artifact.bat
  45. SET PYTHON=C:\python37_32bit
  46. SET PYTHON_VERSION=3.7
  47. SET PYTHON_ARCH=32
  48. CALL build_single_artifact.bat
  49. SET PYTHON=C:\python37
  50. SET PYTHON_VERSION=3.7
  51. SET PYTHON_ARCH=64
  52. CALL build_single_artifact.bat