do we want `./pants run <target...>` to have...
# pex
a
do we want
./pants run <target...>
to have access to the pants environment? this excerpt from above:
Copy code
pkg_resources.VersionConflict: (pycodestyle 2.4.0 (/home/cosmicexplorer/tools/pants/build-support/pants_dev_deps.venv/lib/python2.7/site-packages), Requirement.parse('pycodestyle<2.4.0,>=2.0.0'))
seems to imply the pants venv is interacting with the
PYTHONPATH
exposed to python binaries? because the target
src/python/pants/util:s3_log_aggregator_bin
i think shouldn't be getting anything from the pants venv? i could be way mistaken. in fact, that's probably wrong in that that python binary target depends on
3rdparty/python:future
, which is in
requirements.txt
and therefore probably taken from the pants venv intentionally (an except of the BUILD file):
Copy code
python_library(
  name = 's3_log_aggregator',
  sources = ['s3_log_aggregator.py'],
  dependencies = [
    '3rdparty/python:future',
    '3rdparty/python:s3logparse'
  ]
)

python_binary(
  name = 's3_log_aggregator_bin',
  entry_point = 'pants.util.s3_log_aggregator',
  dependencies = [
    ':s3_log_aggregator'
  ]
)
e
Your inference here is off. If you look at the full log from above the failure is in pyprep.requirements which is upstream of run. If you PEX_VERBOSE=9 you'll see this issue is encountered when building up the pex environment that will later be used for the run.
It's a straight-up legit version conflict; ie: our repo is no longer globally consistent for python 3rdparty. The best fix for now is probably just a dep fix.