Bo Yang 7 anni fa
parent
commit
45f58d40b0
2 ha cambiato i file con 35 aggiunte e 6 eliminazioni
  1. 19 6
      appveyor.bat
  2. 16 0
      appveyor.yml

+ 19 - 6
appveyor.bat

@@ -1,10 +1,23 @@
 setlocal
 
+echo %PATH%
 pip install wheel
-cd %REPO_DIR%\python
+
+cd %REPO_DIR%
 git checkout %BUILD_COMMIT%
-sed -i 's/\[\'-Wno-write-strings\',/\[\]/g' setup.py
-sed -i '/Wno-invalid-offsetof/d' setup.py
-sed -i '/Wno-sign-compare/d' setup.py
-cat setup.py
-python setup.py bdist_wheel --cpp_implementation --compile_static_extension
+mingw-get
+sh autogen.sh
+
+REM cd python
+REM sed -i '/Wno-sign-compare/a \ \ \ \ extra_compile_args.append(\'-D_hypot=hypot\')' setup.py
+REM cat setup.py
+REM 
+REM REM sed -i 's/\[\'-Wno-write-strings\',/\[\]/g' setup.py
+REM REM sed -i '/Wno-invalid-offsetof/d' setup.py
+REM REM sed -i '/Wno-sign-compare/d' setup.py
+REM 
+REM dir %MINGW%
+REM set path
+REM gcc
+REM %MINGW%\gcc
+REM python setup.py bdist_wheel --cpp_implementation --compile_static_extension

+ 16 - 0
appveyor.yml

@@ -1,3 +1,4 @@
+
 # vim ft=yaml
 # CI on Windows via appveyor
 
@@ -7,6 +8,8 @@ environment:
     PACKAGE_NAME: protobuf
     BUILD_COMMIT: v3.5.1
     PROTOC_VERSION: 3.5.1
+    MINGW_32: C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin
+    MINGW_64: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin
     # NP_BUILD_DEP: "numpy==1.10.4"
     # NP_TEST_DEP: "numpy==1.10.4"
     # OTHER_BUILD_DEP: "cython jinja2"
@@ -71,6 +74,19 @@ install:
     - 7z x protoc-%PROTOC_VERSION%.zip
     - del /Q protoc-%PROTOC_VERSION%.zip
     - SET PATH=%cd%\bin;%PATH%
+    # - IF "%PYTHON_ARCH%"=="32" (
+    #     SET MINGW=%MINGW_32%
+    #   ) ELSE (
+    #     SET MINGW=%MINGW_64%
+    #   )
+    - SET MINGW=%MINGW_32%
+    - echo %MINGW%
+    - echo %PYTHON%
+    - SET PATH=%MINGW%;%PATH%
+    - dir %MINGW%
+    - echo [build] > C:\Python27\Lib\distutils\distutils.cfg
+    - echo.compiler = mingw32 >> C:\Python27\Lib\distutils\distutils.cfg
+    - cat "C:\Python27\Lib\distutils\distutils.cfg"
 
 build_script:
     - CALL appveyor.bat