buck2 icon indicating copy to clipboard operation
buck2 copied to clipboard

make_pex_standalone binary / deployment

Open teh opened this issue 1 year ago • 6 comments

The output in buck-out uses symlinks which is fine for running locally. What binary would I pass to make_pex_standalone to build a standalone pex for shipping?

More generally to "install" somewhere else I can use rsync -L to resolve symlinks and ship my binaries - are there any plans to provide shippable output (self contained or as a directory)?

teh avatar May 03 '23 11:05 teh

From reading rule implementation

https://github.com/facebook/buck2/blob/main/prelude/python/make_pex.bzl#L158-L192

I get that you can pass package_style = "standalone" to python_binary or use [standalone] subtarget.

Does it work?

stepancheg avatar May 03 '23 18:05 stepancheg

I expect that that is going to depend on the make_pex_standalone that @teh mentioned (and presumably isn't yet implemented in the oss python toolchain).

cjhopman avatar May 03 '23 19:05 cjhopman

hey folks, wanted to follow up on this to see if there has been progress on supporting standalone pex?

jamil-s avatar Feb 02 '24 19:02 jamil-s

i am also interested in this.

thesayyn avatar May 15 '24 17:05 thesayyn

@cjhopman Do you know if there are any plans to open source this part of the Python toolchain? If not, would you be open to contributions to add it? It seems like all it takes is to implement make_py_package_cmd, but having to reverse-engineer exactly how it should behave might be slightly tricky, so any pointers would be appreciated.

cbarrete avatar May 31 '24 17:05 cbarrete

@JakobDegen Do you know if there's a way this could be open sourced at some point? I've given this a shot at some point, but failed to reverse engineer what is supposed to happen in there.

cbarrete avatar Aug 22 '24 14:08 cbarrete