Issues building pants (NOTE for everyone): I've b...
# general
h
Issues building pants (NOTE for everyone): I've been using Pants for 3 years now. In the past year, I've tried updating Pants a few times and always got an error (but the reason WAS NOT Pants). Fast forward one year later, I got a new computer and installed Arch Linux on it (my previous system). With a fresh install of Arch Linux, I still couldn't get Pants to install. It would hang on Collecting psutil==5.7.0 Using cached psutil-5.7.0-cp38-cp38-linux_x86_64.whl Realizing Arch Linux had issues with just building a make package, I tried to boot Arch Linux from a USB drive, log in to my account (aka chroot), and then build Pants. And it worked flawlessly. The point is that several things can be broken in your system, preventing Pants from updating or being installed. In that case, try booting from a fresh USB drive and then do your updates.
✔️ 1
👀 1
h
Glad to hear it's working now! Let us know if you have any questions or suggestions with Pants 🙂 With the issue building downstream deps like psutil, you could also try consuming Pants as a Pex: https://www.pantsbuild.org/docs/proxies#installing-pants
h
Proxies looks like a good method. I will definitely try this in the future, but I'm kind of worried it will install extra dependencies on my system. Will it?
h
The proxy isn't the relevant part here, the docs only happen to be on that page I mean the section about installing from a Pex - that means that all the dependencies are already bundled into a single binary file. You don't need to install things like
psutil
because it's prebuilt for you
h
Oh, ya that's what I understood, a pre-build bin. But wouldn't that mean you have to download a larger file, with all the dependecies? (I'm not entirely sure how Python would do it.)
h
I'm kind of worried it will install extra dependencies on my system. Will it?
Depends what you mean - Pants will download things like Pytest and your 3rd party dependencies so that it can run these tools, but that happens in
~/.cache/pants
and won't leak into your system If you install Pants via the
./pants
script, pip will also install Pants dependencies into
~/.cache/pants/setup
. If you use the Pex approach, that part is skipped
But wouldn't that mean you have to download a larger file, with all the dependecies?
Indeed. Although, with the normal
./pants
script, pip will still have to download those deps either way (unless already cached)
h
Ahh, good point. I will have to try that in the future. Thanks for letting me know this!
❤️ 1