happy-kitchen-89482
04/02/2020, 7:46 PMhappy-kitchen-89482
04/02/2020, 7:49 PM./pants binary <python binary target>
, a pex gets created from all of the transitive closure of the internal (python_library) and external (3rdparty requirements) dependencies of that target.happy-kitchen-89482
04/02/2020, 7:52 PMhappy-kitchen-89482
04/02/2020, 7:52 PMhappy-kitchen-89482
04/02/2020, 10:51 PM./pants binary <target>
today and any inputs have changed (even if only first-party code) the pex creation will today re-run pip to re-resolve the remote dependencies. This is a byproduct of pex building being completely hermetic, and therefore dependent only on its inputs. We are actively working on fixing this in two ways: 1) Add support for building a pex on top of an existing pex, so that there is one stable 3rdparty requirements pex, and we build the binary pex out of that. 2) Allow pants to use Pex's existing caching mechanism (by allowing this specific form of side-effect).happy-kitchen-89482
04/02/2020, 10:51 PMaloof-angle-91616
04/02/2020, 10:57 PMpip fetch
(one example is in https://github.com/pypa/pip/issues/7819) to get all the necessary info to build the pex with, without needing to download dependencies. but if we can make use of the normal pex cache, then the speedup of that approach is lessened somewhat, although i am actively investigating this. pip is working on upgrading its resolver upstream, which would potentially change further what is cached across pex runs in the future as well.happy-kitchen-89482
04/03/2020, 12:10 AMaloof-angle-91616
04/03/2020, 12:12 AMhappy-kitchen-89482
04/03/2020, 12:12 AMaloof-angle-91616
04/03/2020, 12:12 AMhappy-kitchen-89482
04/03/2020, 12:12 AMhappy-kitchen-89482
04/03/2020, 12:13 AMaloof-angle-91616
04/03/2020, 12:13 AMwitty-crayon-22786
04/03/2020, 10:15 PMhappy-kitchen-89482
04/04/2020, 1:22 AMaloof-angle-91616
04/06/2020, 5:11 PMwitty-crayon-22786
04/07/2020, 6:24 PM2.1.6
in the 1.26.x
pants branch:
Traceback (most recent call last):
File "/Users/stuhood/src/source/.pants.d/test/pytest-prep/CPython-2.7.16/9ea622545c7f4f99caa61a8eef94bfbd3992d5a7/.bootstrap/pex/pex.py", line 391, in execute
working_set = self._activate()
File "/Users/stuhood/src/source/.pants.d/test/pytest-prep/CPython-2.7.16/9ea622545c7f4f99caa61a8eef94bfbd3992d5a7/.bootstrap/pex/pex.py", line 89, in _activate
for dist in env.activate():
File "/Users/stuhood/src/source/.pants.d/test/pytest-prep/CPython-2.7.16/9ea622545c7f4f99caa61a8eef94bfbd3992d5a7/.bootstrap/pex/environment.py", line 232, in activate
self._working_set = self._activate()
File "/Users/stuhood/src/source/.pants.d/test/pytest-prep/CPython-2.7.16/9ea622545c7f4f99caa61a8eef94bfbd3992d5a7/.bootstrap/pex/environment.py", line 393, in _activate
resolved = self._resolve(working_set, all_reqs)
File "/Users/stuhood/src/source/.pants.d/test/pytest-prep/CPython-2.7.16/9ea622545c7f4f99caa61a8eef94bfbd3992d5a7/.bootstrap/pex/environment.py", line 275, in _resolve
distributions_by_key[<http://distribution.as|distribution.as>_requirement().key].append(distribution)
AttributeError: 'NoneType' object has no attribute 'as_requirement'
witty-crayon-22786
04/07/2020, 10:34 PMpip
invokes running under pex
... https://github.com/pantsbuild/pants/pull/9328 propagated pants' logging to pex, but pex does not propagate its own log level to piphappy-kitchen-89482
04/08/2020, 12:59 AMwitty-crayon-22786
04/10/2020, 5:26 PMpex --no-build --no-pypi --disable-cache -f /tmp/tmp.lZIeuxe9PT/dist/deploy/wheels/pantsbuild.pants/e789654e53bd346f7d3604402f13aca03f53429d/1.26.0rc1+gite789654e -f /tmp/tmp.lZIeuxe9PT/dist/deploy/wheels/3rdparty/e789654e53bd346f7d3604402f13aca03f53429d/1.26.0rc1+gite789654e -o /tmp/tmp.lZIeuxe9PT/dist/pants.1.26.0rc1+gite789654e.py36.pex -vvvvvvvvv --no-emit-warnings --no-strip-pex-env --script=pants '--interpreter-constraint=CPython==3.6.*' --platform=linux_x86_64-cp-36-m --platform=macosx_10.11_x86_64-cp-36-m pantsbuild.pants==1.26.0rc1+gite789654e pantsbuild.pants.contrib.confluence==1.26.0rc1+gite789654e pantsbuild.pants.contrib.go==1.26.0rc1+gite789654e pantsbuild.pants.contrib.mypy==1.26.0rc1+gite789654e pantsbuild.pants.contrib.node==1.26.0rc1+gite789654e pantsbuild.pants.contrib.python.checks==1.26.0rc1+gite789654e pantsbuild.pants.contrib.scalajs==1.26.0rc1+gite789654e pantsbuild.pants.contrib.scrooge==1.26.0rc1+gite789654e pantsbuild.pants.contrib.avro==1.26.0rc1+gite789654e pantsbuild.pants.contrib.googlejavaformat==1.26.0rc1+gite789654e pantsbuild.pants.testutil==1.26.0rc1+gite789654e
aloof-angle-91616
04/11/2020, 6:00 AMaloof-angle-91616
04/11/2020, 6:01 AMaloof-angle-91616
04/11/2020, 6:01 AMaloof-angle-91616
04/11/2020, 6:02 AMwitty-crayon-22786
04/17/2020, 12:22 AMred-jackal-13334
04/23/2020, 9:10 AMred-jackal-13334
04/23/2020, 9:17 AMpip install azure-cli
python -m azure.cli
everything works as expected. but when i try this
pex azure-cli -m azure.cli -o az
./az
i get this error
Traceback (most recent call last):
File "/az/.bootstrap/pex/pex.py", line 396, in execute
File "/az/.bootstrap/pex/pex.py", line 328, in _wrap_coverage
File "/az/.bootstrap/pex/pex.py", line 359, in _wrap_profiling
File "/az/.bootstrap/pex/pex.py", line 447, in _execute
File "/az/.bootstrap/pex/pex.py", line 544, in execute_entry
File "/az/.bootstrap/pex/pex.py", line 551, in execute_module
File "/usr/local/lib/python3.7/runpy.py", line 201, in run_module
mod_name, mod_spec, code = _get_module_details(mod_name)
File "/usr/local/lib/python3.7/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/root/.pex/installed_wheels/70125b7d832d1ca0e01f7578de3d97524756eb0e/azure_cli_core-2.4.0-py3-none-any.whl/azure/__init__.py", line 5, in <module>
import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
how do i debug and fix this?red-jackal-13334
04/23/2020, 9:19 AMred-jackal-13334
04/23/2020, 9:21 AMpex --version
pex 2.1.9