Bo Yang 7 роки тому
батько
коміт
2fc33c3197

+ 3 - 1
kokoro/release/python/linux/build_artifacts.sh

@@ -32,8 +32,10 @@ build_artifact_version() {
 
   clean_code $REPO_DIR $BUILD_COMMIT
   sed -i '/Wno-sign-compare/a \ \ \ \ \ \ \ \ extra_compile_args.append("-std=c++11")' $REPO_DIR/python/setup.py
-  sed -i '/Wno-sign-compare/a \ \ \ \ \ \ \ \ extra_compile_args.append("-Wno-incompatible-pointer-types")' $REPO_DIR/python/setup.py
   cat $REPO_DIR/python/setup.py
+  pushd $REPO_DIR
+  git cherry-pick 0a59054c30e4f0ba10f10acfc1d7f3814c63e1a7
+  popd
 
   build_wheel $REPO_DIR/python $PLAT
 

+ 3 - 1
kokoro/release/python/macos/build_artifacts.sh

@@ -35,7 +35,9 @@ build_artifact_version() {
   before_install
 
   clean_code $REPO_DIR $BUILD_COMMIT
-  sed -i.bak '/Wno-sign-compare/a \ \ \ \ \ \ \ \ extra_compile_args.append("-Wno-incompatible-pointer-types")' $REPO_DIR/python/setup.py
+  pushd $REPO_DIR
+  git cherry-pick 0a59054c30e4f0ba10f10acfc1d7f3814c63e1a7
+  popd
 
   build_wheel $REPO_DIR/python $PLAT
 

+ 1 - 2
kokoro/release/python/windows/build_single_artifact.bat

@@ -29,6 +29,7 @@ git clone https://github.com/google/protobuf.git
 REM Checkout release commit
 cd %REPO_DIR%
 git checkout %BUILD_COMMIT%
+git cherry-pick 0a59054c30e4f0ba10f10acfc1d7f3814c63e1a7
 
 REM ======================
 REM Build Protobuf Library
@@ -54,8 +55,6 @@ REM ======================
 cd python
 
 REM sed -i 's/\ extra_compile_args\ =\ \[\]/\ extra_compile_args\ =\ \[\'\/MT\'\]/g' setup.py
-sed -i 's/\ extra_compile_args\ =\ \[\]/\ extra_compile_args\ =\ \[\'-Wno-incompatible-pointer-types\'\]/g' setup.py
-sed -i '/Werror/d' setup.py
 
 python setup.py bdist_wheel --cpp_implementation --compile_static_extension
 dir dist