jolly-chef-92794
03/18/2016, 8:27 PMjar_library(name=‘hadoop’,
…
)
target(name=‘hadoop-for-libraries’,
scope=‘compile’,
transitive=False,
dependencies=[‘:hadoop’],
)
target(name=‘hadoop-for-tests’,
scope=’runtime’,
dependencies=[‘:hadoop’],
)
java_library(name=‘lib’,
dependencies=[‘:hadoop-for-libraries’],
)
junit_tests(name=‘test’,
dependencies=[‘:hadoop-for-tests’],
)
?witty-crayon-22786
03/18/2016, 8:29 PMwitty-crayon-22786
03/18/2016, 8:29 PMjar_library(name='hadoop',
scopes=['compile', 'test'],
)
java_library(name='lib',
dependencies=[':hadoop'],
)
junit_tests(name='test',
dependencies=[':hadoop'],
)
jvm_binary(name='test',
dependencies=[':hadoop'],
)
witty-crayon-22786
03/18/2016, 8:29 PMwitty-crayon-22786
03/18/2016, 8:29 PMancient-stone-50795
03/18/2016, 8:30 PMjolly-chef-92794
03/18/2016, 8:35 PMcompile
and test
are mutually exclusive right now, but that’s kind of a technical detail. So with transitivity, it’d look like:
jar_library(name='hadoop',
scopes=['compile', 'test'],
)
target(name=‘hadoop-intransitive’,
intransitive=True,
dependencies=[‘:hadoop’],
)
java_library(name='lib',
dependencies=[‘:hadoop-intransitive'],
)
junit_tests(name='test',
dependencies=[':hadoop'],
)
jvm_binary(name='test',
dependencies=[':hadoop'],
)
jolly-chef-92794
03/18/2016, 8:38 PMclasspath_scopes
and classpath_transitive
thoughjolly-chef-92794
03/18/2016, 8:39 PMtarget()
that are explicitly relevant only to jvm_targets()
jolly-chef-92794
03/18/2016, 8:39 PMscopes
in the more generic sense, we at least maintain a semblance of general applicabilityrough-minister-58256
03/18/2016, 8:40 PMclever-ambulance-21321
03/18/2016, 8:40 PMrough-minister-58256
03/18/2016, 8:40 PMclever-ambulance-21321
03/18/2016, 8:40 PMrough-minister-58256
03/18/2016, 8:42 PMpkg_resources.resource_stream
etc OR set zip_safe=False
on your targets to make pex auto-explode the zip at runtime.rough-minister-58256
03/18/2016, 8:42 PMclever-ambulance-21321
03/18/2016, 8:43 PMrough-minister-58256
03/18/2016, 8:44 PMclever-ambulance-21321
03/18/2016, 8:44 PMclever-ambulance-21321
03/18/2016, 8:44 PMrough-minister-58256
03/18/2016, 8:45 PMclever-ambulance-21321
03/18/2016, 8:45 PMclever-ambulance-21321
03/18/2016, 8:46 PMrough-minister-58256
03/18/2016, 8:48 PMrough-minister-58256
03/18/2016, 8:48 PMcd dir && python2.7 .
clever-ambulance-21321
03/18/2016, 8:49 PMclever-ambulance-21321
03/18/2016, 8:50 PMclever-ambulance-21321
03/18/2016, 8:50 PMrough-minister-58256
03/18/2016, 8:52 PM~/.pex/
by defaultrough-minister-58256
03/18/2016, 8:52 PMPEX_VERBOSE=9 ./the.pex
to get some debug output about the runtime