1 # Define custom utilities
2 # Test for OSX with [ -n "$IS_OSX" ]
5 # Any stuff that you need to do before you start building the wheels
6 # Runs in the root directory of this repository.
9 yum install -y devtoolset-2-libatomic-devel
15 CXXFLAGS="-fPIC -g -O2" ./configure
18 # Generate python dependencies.
20 python setup.py build_py
26 function bdist_wheel_cmd {
27 # Builds wheel with bdist_wheel, puts into wheelhouse
29 # It may sometimes be useful to use bdist_wheel for the wheel building
30 # process. For example, versioneer has problems with versions which are
31 # fixed with bdist_wheel:
32 # https://github.com/warner/python-versioneer/issues/121
33 local abs_wheelhouse=$1
35 # Modify build version
38 python setup.py bdist_wheel --cpp_implementation --compile_static_extension
39 cp dist/*.whl $abs_wheelhouse
42 function build_wheel {
43 build_wheel_cmd "bdist_wheel_cmd" $@
47 # Runs tests on installed distribution from an empty directory
49 python -c "from google.protobuf.pyext import _message;"