diff options
author | Paul Yang <TeBoring@users.noreply.github.com> | 2018-08-06 22:07:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-06 22:07:52 -0700 |
commit | fba5ef410ad4a851fb4200b7380e3320ee048266 (patch) | |
tree | 9cf3cf4fe8b462c9bb102eddbdcb3d5b37144826 /kokoro/release/python/linux/config.sh | |
parent | 770dde7d314e4fb06ab12244dbd1972157c648ad (diff) | |
download | protobuf-fba5ef410ad4a851fb4200b7380e3320ee048266.tar.gz protobuf-fba5ef410ad4a851fb4200b7380e3320ee048266.tar.bz2 protobuf-fba5ef410ad4a851fb4200b7380e3320ee048266.zip |
Python wheel kokoro dev (#5002)
* Add config for building python wheel
* Update submodules
* Fix setup.py to use c++11
* Fix syntax error
* Fix syntax error
* Add dir for artifact
* Update artifact dirctory
* Remove python 3.3
* Clean up virtual env
* Clean up env
* Test environment
* Test env variable
* Automatic update version number
* Remove dependency on python-wheel branch
Diffstat (limited to 'kokoro/release/python/linux/config.sh')
-rw-r--r-- | kokoro/release/python/linux/config.sh | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/kokoro/release/python/linux/config.sh b/kokoro/release/python/linux/config.sh new file mode 100644 index 00000000..bfa8a009 --- /dev/null +++ b/kokoro/release/python/linux/config.sh @@ -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="-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;" +} |