Pin the pants binary to osx and linux platforms.

Review Request #114 — Created March 18, 2014 and submitted

jsirois
commons
jsirois/pants/multiplatform_bin
252
pants-reviews
benjyw, patricklaw, wickman
This works the 1st half of the version conflict thread by sanitizing platforms and eggs for the pants binary.

commit 1e9ca6e54176b48ea2011c0d2cc183adf0a180c7
Author: John Sirois <jsirois@twitter.com>
Date:   Tue Mar 18 10:55:06 2014 -0600

    Pin the pants binary to osx and linux platforms.
    
    Also update to coverage 3.7.1 which has a good set of
    osx and linux eggs deployed at:
      https://github.com/twitter/commons/blob/binaries/pants/third_party/python/dist/

 3rdparty/python/BUILD              | 2 +-
 src/python/twitter/pants/bin/BUILD | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)
$ ./build-support/python/clean.sh 
$ ./pants.bootstrap
$ zipinfo pants.pex | grep -E "linux|macosx" | grep PKG-INFO
-rw-r--r--  2.0 unx     1775 b- defN 14-Mar-18 10:46 .deps/coverage-3.7.1-py2.6-linux-x86_64.egg/EGG-INFO/PKG-INFO
-rw-r--r--  2.0 unx     1775 b- defN 14-Mar-18 10:46 .deps/coverage-3.7.1-py2.6-macosx-10.4-x86_64.egg/EGG-INFO/PKG-INFO
-rw-r--r--  2.0 unx    11322 b- defN 14-Mar-18 10:46 .deps/psutil-1.1.2-py2.6-linux-x86_64.egg/EGG-INFO/PKG-INFO
-rw-r--r--  2.0 unx    11322 b- defN 14-Mar-18 10:46 .deps/psutil-1.1.2-py2.6-macosx-10.4-x86_64.egg/EGG-INFO/PKG-INFO
$ PANTS_PY_COVERAGE=1 ./pants.pex tests/python/twitter/pants/java/
Build operating on targets: OrderedSet([PythonTestSuite(tests/python/twitter/pants/java/BUILD:java)])
============================================================================================================================== test session starts ===============================================================================================================================
platform linux3 -- Python 2.6.8 -- pytest-2.3.5
collected 7 items 

tests/python/twitter/pants/java/distribution/test_distribution.py .......
---------------------------------------------------------------------------------------------------------------- coverage: platform linux3, python 2.6.8-final-0 -----------------------------------------------------------------------------------------------------------------
Name                                                          Stmts   Miss Branch BrMiss  Cover
-----------------------------------------------------------------------------------------------
/tmp/tmpmjYnu8/twitter/pants/java/distribution/__init__           2      0      0      0   100%
/tmp/tmpmjYnu8/twitter/pants/java/distribution/distribution     132     25     46     18    76%
-----------------------------------------------------------------------------------------------
TOTAL                                                           134     25     46     18    76%
Coverage HTML written to dir /home/jsirois/dev/3rdparty/twitter-commons2/dist/coverage/tests/python/twitter/pants/java/distribution/distribution

============================================================================================================================ 7 passed in 0.50 seconds ============================================================================================================================
============================================================================================================================== test session starts ===============================================================================================================================
platform linux3 -- Python 2.6.8 -- pytest-2.3.5
collected 4 items 

tests/python/twitter/pants/java/jar/test_open_jar.py ....
---------------------------------------------------------------------------------------------------------------- coverage: platform linux3, python 2.6.8-final-0 -----------------------------------------------------------------------------------------------------------------
Name                                             Stmts   Miss Branch BrMiss  Cover
----------------------------------------------------------------------------------
/tmp/tmpoa4exf/twitter/pants/java/jar/__init__      34      0      4      0   100%
/tmp/tmpoa4exf/twitter/pants/java/jar/manifest      27     14      8      6    43%
----------------------------------------------------------------------------------
TOTAL                                               61     14     12      6    73%
Coverage HTML written to dir /home/jsirois/dev/3rdparty/twitter-commons2/dist/coverage/tests/python/twitter/pants/java/jar/jar

============================================================================================================================ 4 passed in 0.18 seconds ============================================================================================================================
tests.python.twitter.pants.java.distribution.distribution                       .....   SUCCESS
tests.python.twitter.pants.java.jar.jar                                         .....   SUCCESS
PA
  1. Ship It!
  2. 
      
JS
Review request changed

Status: Closed (submitted)

Loading...