From 45f58d40b06405bd4e027747017766ee5e08205d Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Mon, 26 Feb 2018 10:16:55 -0800 Subject: Add mingw --- appveyor.bat | 25 +++++++++++++++++++------ appveyor.yml | 16 ++++++++++++++++ 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/appveyor.bat b/appveyor.bat index 52b56b06..a189b84f 100644 --- a/appveyor.bat +++ b/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 diff --git a/appveyor.yml b/appveyor.yml index d3a25a64..af0a32a7 100644 --- a/appveyor.yml +++ b/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 -- cgit v1.2.3