Re-work native engine version.

Review Request #4367 — Created Nov. 11, 2016 and submitted — Latest diff uploaded

jsirois
pants
jsirois/issues/4035
4034, 4035, 4046
9a1c66f...
pants-reviews
kwlzn, nhoward_tw, stuhood
This switches the `Native` subsystem to load the proper native engine
library version from a resource file that is, in-turn, auto-managed by
the pants script itself ensuring that pants, both in-repo and as a
released package (pex or sdist or wheel), will always ask for the exact
native engine library version it was built and tested with.

A follow-up change will ensure we release a native engine library to
bintray for all packaged releases, fulfilling the released pants package
portion of the contract.

 build-support/bootstrap_native                          | 21 ++++++++++++++++-----
 build-support/common.sh                                 |  2 +-
 pants                                                   |  1 -
 src/python/pants/engine/subsystem/BUILD                 | 14 +++++++++++---
 src/python/pants/engine/subsystem/README.md             |  8 ++++++++
 src/python/pants/engine/subsystem/native.py             | 11 ++++++++---
 src/python/pants/engine/subsystem/native_engine_version |  1 +
 7 files changed, 45 insertions(+), 13 deletions(-)

Locally exercised both loose and packaged default version:

$ ./pants options --scope=native-engine --name=version
native-engine.version = 83a37939cc48722fc930bd4493aec3b48bef2ac0 (from HARDCODED)

$ src/python/pants/bin:pants_local_binary
$ ./dist/pants_local_binary.pex options --scope=native-engine --name=version
native-engine.version = 83a37939cc48722fc930bd4493aec3b48bef2ac0 (from HARDCODED)

CI went green here
https://travis-ci.org/pantsbuild/pants/builds/175187641

Loading...