https://pantsbuild.org/ logo
#general
Title
# general
f

freezing-area-97131

04/14/2022, 11:51 PM
Hi, I just upgraded to 2.10 and fix all the BUILD file errors. Now I am trying to build pex. It seems to take forever… Any suggestion?
Copy code
$ ./pants run bin:xxx
⠠ 867.12s Building xxx.pex with 77 requirements: ...
e

enough-analyst-54434

04/14/2022, 11:53 PM
How long does Pip take to install those same 77 requirements if you create a new virtual environment, clear the pip cache, and then run
pip install ...
in that venv? Alot less time or comparable?
f

freezing-area-97131

04/15/2022, 12:04 AM
How do I get all those requirements?
e

enough-analyst-54434

04/15/2022, 12:34 AM
Presumably they're in a requirements file or a project.toml file you already told Pants about with a BUILD target.
But easiest is probably to re-run Pants with the
--no-process-cleanup
option. That will print a line just before the "Building xxx.pex" line telling you where that action's sandbox directory is. You can look at the contents of the
__run.sh
file in that directory to see the command Pants is running. That will list all the requirements.
f

freezing-area-97131

04/15/2022, 12:52 AM
I just followed your instruction and pip install in a venv, and I got this:
Copy code
Collecting rsa>=3.1.4
  Downloading rsa-4.7.1.tar.gz (38 kB)
ERROR: Package 'rsa' requires a different Python: 2.7.12 not in '>=3.5, <4'
This should be the root cause that it stuck
full log
e

enough-analyst-54434

04/15/2022, 1:01 AM
Ok. Does that mean you know what to do then to re-work your deps to not need that version of rsa?
f

freezing-area-97131

04/15/2022, 1:03 AM
yep! I have to pin that rsa version.