twitter/commons — pull request #198 by jsirois (2014-01-21 15:58:01+00:00)
Title: Sync python-commons changes over the last week

This runs green:
``` console
$ ./build-support/python/clean.sh && ./pants.bootstrap
$ ./pants tests/python/twitter/common:all
$ ./pants tests/python/twitter/pants:all
```

Also multi-interpreter support is plumbed through pants:
``` console
$ ./pants tests/python/twitter/common/util/
Build operating on targets: OrderedSet([PythonTests(tests/python/twitter/common/util/BUILD:util)])
============================================================================================================================== test session starts ===============================================================================================================================
platform linux3 -- Python 2.6.8 -- pytest-2.3.5
collected 14 items

tests/python/twitter/common/util/command_util_test.py ......
tests/python/twitter/common/util/topological_sort_test.py ........

=========================================================================================================================== 14 passed in 0.16 seconds ============================================================================================================================
tests.python.twitter.common.util.util ..... SUCCESS
$ ./pants build -i 'CPython>2.6.8' tests/python/twitter/common/util/
Build operating on targets: OrderedSet([PythonTests(tests/python/twitter/common/util/BUILD:util)])
============================================================================================================================== test session starts ===============================================================================================================================
platform linux2 -- Python 2.7.5 -- pytest-2.3.5
collected 14 items

tests/python/twitter/common/util/command_util_test.py ......
tests/python/twitter/common/util/topological_sort_test.py ........

=========================================================================================================================== 14 passed in 0.15 seconds ============================================================================================================================
tests.python.twitter.common.util.util ..... SUCCESS
$ ./pants build -i 'CPython>3' tests/python/twitter/common/util/
Build operating on targets: OrderedSet([PythonTests(tests/python/twitter/common/util/BUILD:util)])
============================================================================================================================== test session starts ===============================================================================================================================
platform linux -- Python 3.3.2 -- pytest-2.5.1
collected 14 items

tests/python/twitter/common/util/command_util_test.py ......
tests/python/twitter/common/util/topological_sort_test.py ........

=========================================================================================================================== 14 passed in 0.13 seconds ============================================================================================================================
tests.python.twitter.common.util.util ..... SUCCESS
```

Note the new ~/.pex layout:
``` console
$ tree -d -L 3 ~/.pex/
/home/jsirois/.pex/
└── install
├── 1667505e8d3f4404f9a32521cda15ed05e230708
│ └── logilab_common-0.60.1-py2.7.egg
├── 166fe52b993a4ce708c74579b9885d6be9f3e018
│ └── psutil-1.1.2-py2.7-macosx-10.4-x86_64.egg
├── 25db80aac9b1e2169cf6267eebbac59f7fe0b191
│ └── requests-2.0.0-py2.7.egg
├── 47766cf607f6a072eb31da7960d2d40686dc7e7d
│ └── logilab_astng-0.24.3-py2.7.egg
├── 4fac720d7cffb3a2fa05aef2c15114d4f56f256a
│ └── coverage-3.6-py2.7-macosx-10.4-x86_64.egg
├── 7bcac12a588a7ca57b65dc37e0f9bf5bad9ead7b
│ └── pylint-0.25.1-py2.7.egg
├── a17adc09a65134d6bcd167a44b96bd19977cac4e
│ └── pytest-2.3.5-py2.7.egg
├── a6168101fc35b3dfef91bb45b046a4038d308616
│ └── setuptools-2.1-py2.7.egg
├── c93470864d0c03a96ccd69e82be9c2b9722e743a
│ └── psutil-1.1.2-py2.7-linux-x86_64.egg
├── cdb85fde15aa485376b6e44ccbd3ce55ac52772d
│ └── Pygments-1.4-py2.7.egg
└── d8e30dd36398ceff8187333c1dada6c6dcf1e69d
└── coverage-3.7.1-py2.7-linux-x86_64.egg

23 directories
$ unzip -qc pants.pex PEX-INFO | python -mjson.tool
{
"always_write_cache": false,
"build_properties": {
"branch": "jsirois/sync/python-3",
"class": "CPython",
"datetime": "Tuesday Jan 21, 2014 07:52:44",
"id": null,
"machine": "gill",
"path": "/home/jsirois/dev/3rdparty/jsirois-commons",
"platform": "linux-x86_64",
"revision": "692fb42a7c666acf5444c1f2ade33403ffa23a76",
"tag": "692fb42",
"timestamp": 1390315964.01052,
"user": "jsirois",
"version": [
2,
7,
5
]
},
"code_hash": "c2aab9994dbfa8192a571a1d5b17bf8823ed47ca",
"distributions": {
"Markdown-2.1.1-py2.7.egg": "04c4870a51acdb0c0865428395cc6e1ae5a93ae2",
"Pygments-1.4-py2.7.egg": "cdb85fde15aa485376b6e44ccbd3ce55ac52772d",
"ansicolors-1.0.2-py2.7.egg": "bb37d674fe8b33640dfa018ce9ba809c120c22d9",
"cov_core-1.7-py2.7.egg": "3d52626f131cad445db7755e348b1909eeb69011",
"coverage-3.6-py2.7-macosx-10.4-x86_64.egg": "4fac720d7cffb3a2fa05aef2c15114d4f56f256a",
"coverage-3.7.1-py2.7-linux-x86_64.egg": "d8e30dd36398ceff8187333c1dada6c6dcf1e69d",
"elementtree-1.2.7_20070827_preview-py2.7.egg": "f6f2fe05694c8c6935ae7cb781482e97d277c936",
"lockfile-0.9.1-py2.7.egg": "5435da594823b2a5fada8420dfc74b9885d1ecab",
"logilab_astng-0.24.3-py2.7.egg": "47766cf607f6a072eb31da7960d2d40686dc7e7d",
"logilab_common-0.60.1-py2.7.egg": "1667505e8d3f4404f9a32521cda15ed05e230708",
"psutil-1.1.2-py2.7-linux-x86_64.egg": "c93470864d0c03a96ccd69e82be9c2b9722e743a",
"psutil-1.1.2-py2.7-macosx-10.4-x86_64.egg": "166fe52b993a4ce708c74579b9885d6be9f3e018",
"py-1.4.19-py2.7.egg": "57a119636abafa7e37e36ed66cd3146fff49efe4",
"pylint-0.25.1-py2.7.egg": "7bcac12a588a7ca57b65dc37e0f9bf5bad9ead7b",
"pystache-0.5.3-py2.7.egg": "713d51a90431827495dad99798c08835efdcfd88",
"pytest-2.3.5-py2.7.egg": "a17adc09a65134d6bcd167a44b96bd19977cac4e",
"pytest_cov-1.6-py2.7.egg": "a3781c3a7140459107fb5ed2700761bd685aba58",
"python_daemon-1.5.5-py2.7.egg": "095f2ca5238c2e7423bf1dd657340d8f23faf510",
"requests-2.0.0-py2.7.egg": "25db80aac9b1e2169cf6267eebbac59f7fe0b191",
"setuptools-2.1-py2.7.egg": "a6168101fc35b3dfef91bb45b046a4038d308616"
},
"entry_point": "twitter.pants.bin.pants_exe:main",
"ignore_errors": false,
"inherit_path": false,
"requirements": [
[
"ansicolors==1.0.2",
null,
false
],
[
"elementtree==1.2.7-20070827-preview",
null,
false
],
[
"Markdown==2.1.1",
null,
false
],
[
"psutil==1.1.2",
null,
false
],
[
"Pygments==1.4",
null,
false
],
[
"pystache==0.5.3",
null,
false
],
[
"pytest==2.3.5",
null,
false
],
[
"pytest-cov==1.6",
null,
false
],
[
"python-daemon==1.5.5",
null,
false
],
[
"requests==2.0.0",
null,
false
],
[
"pylint==0.25.1",
null,
false
],
[
"setuptools==2.1",
null,
false
]
],
"zip_safe": true
}
```