forked from protocolbuffers/protobuf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix python release build. (protocolbuffers#5636)
* Fix python release build. * Separate config.sh by platform * Use KOKORO_JOR_NAME to determine the BUILD_COMMIT. * Use -std=c++14 on MacOS so -latomic can be used.
- Loading branch information
Hao Nguyen
authored
Jan 26, 2019
1 parent
d135f07
commit fac8e34
Showing
4 changed files
with
65 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Define custom utilities | ||
# Test for OSX with [ -n "$IS_OSX" ] | ||
|
||
function pre_build { | ||
# Any stuff that you need to do before you start building the wheels | ||
# Runs in the root directory of this repository. | ||
pushd protobuf | ||
|
||
# Build protoc | ||
./autogen.sh | ||
./configure | ||
|
||
CXXFLAGS="-std=c++14 -fPIC -g -O2" ./configure | ||
make -j8 | ||
|
||
# Generate python dependencies. | ||
pushd python | ||
python setup.py build_py | ||
popd | ||
|
||
popd | ||
} | ||
|
||
function bdist_wheel_cmd { | ||
# Builds wheel with bdist_wheel, puts into wheelhouse | ||
# | ||
# It may sometimes be useful to use bdist_wheel for the wheel building | ||
# process. For example, versioneer has problems with versions which are | ||
# fixed with bdist_wheel: | ||
# https://github.com/warner/python-versioneer/issues/121 | ||
local abs_wheelhouse=$1 | ||
|
||
# Modify build version | ||
pwd | ||
ls | ||
python setup.py bdist_wheel --cpp_implementation --compile_static_extension | ||
cp dist/*.whl $abs_wheelhouse | ||
} | ||
|
||
function build_wheel { | ||
build_wheel_cmd "bdist_wheel_cmd" $@ | ||
} | ||
|
||
function run_tests { | ||
# Runs tests on installed distribution from an empty directory | ||
python --version | ||
python -c "from google.protobuf.pyext import _message;" | ||
} |