fix compilation on Windows Python 2.7 + support for MINGW32 and Cygwin#133
Conversation
|
I just added a try/except clause to skip the |
|
I created a separate PR for the header issues. Could you merge your python changes in one PR? After I merge that, we should be good to cut the release, right? |
|
thanks! sure, I'll do that now. |
… terminated Sorry, my fault...
Python 2.7 for Windows is compiled using MS Visaul C++ 9.0 (Visual Studio 2008). However the latter does not support many modern C++ features which are required to compile the Brotli encoder. So we monkey-patch distutils to always look for MSVC version 10.0 instead of 9.0.
… statically link libgcc and libstdc++
…eed to modify it more than once
|
OK, i have consolidated the two PR branches in a single one (the current one). I have also added a I compiled and run the tests on my local Windows and OS X machines. Thanks for the good work! |
fix compilation on Windows Python 2.7 + support for MINGW32 and Cygwin
This includes:
setup.pyto forcedistutilsuse MS Visual C++ 10.0, from Visual Studio 2010, instead of the default 9.0, Visual Studio 2008, when compiling for Windows Python 2.7. The latter does not support many of the modern C++ features required to compile the Brotli encoder. Windows Python version 3 and above are compiled with 2010 so they are ok.setup.pyto allow building Brotli with GCC for Windows, instead of the default Microsoft compiler. This can be done by passing the--compiler=mingw32option to setup.py.streams.ccto fix compilation under the Cygwin environment. Here GCC complains that 'malloc' and 'free' weren't declared in the current scope: