full-author-61014
12/14/2023, 12:11 PMarchive(
name="zip",
format="zip",
packages=[
":target",
],
)
but I'm getting
BinaryNotFoundError: Cannot find `zip` on `['/bin', '/opt/homebrew/bin', '/usr/bin', '/usr/local/bin']`. Please ensure that it is installed so that Pants can create `.zip` archives.
I'm on Arch Linux and the zip binary is actually in
$ which zip
/usr/sbin/zip
How can I adapt the binary search path for the archive rule?ambitious-insurance-64047
12/14/2023, 12:59 PMln -s $(which zip) /usr/local/bin
Then, retry.full-author-61014
12/14/2023, 1:23 PM$ ls -l /usr/sbin
lrwxrwxrwx 1 root root 3 18. Sep 15:18 /usr/sbin -> bin
So the whole /usr/sbin is linked to /bin and the utility is actually there
$ ls -l /usr/bin/zip
-rwxr-xr-x 1 root root 236680 6. Okt 20:44 /usr/bin/zip
Output after linking
$ ln -s /usr/sbin/zip /usr/local/bin/zip
$ which zip
/usr/local/bin/zip
Still getting the same BinaryNotFoundError
.
What is interesting, after adding just the section
[shell-setup]
to pants.toml
it starts to work, even without the symlink.curved-television-6568
12/14/2023, 2:47 PMpants.toml
change (like removing the empty section again) with the symlink gone you’d get the error back as well. This would likely be explained by pantsd
caching the found location of the zip binary, and possibly following the symlink, explaining why it continued working also after removing the symlink.curved-television-6568
12/14/2023, 2:49 PMfull-author-61014
12/14/2023, 3:09 PMpantsd
caching. I commonly run pkill -f pantsd
to restart it in the next pants run. The system_binary_paths
solution works. I am already on 2.20.0.dev1
. Thanks for your time and insights.curved-television-6568
12/14/2023, 3:15 PMpantsd
you can also rm -rf .pids
as a potentially less invasive method.. 😉