wide-midnight-78598
04/05/2023, 9:20 PMscie
creation (for Python, currently). ... Mostly because I'm manually creating these in one of my projects, and manual steps fly in the face of my sensibilities.
https://github.com/sureshjoshi/pants-plugins/blob/83-scie/pants-plugins/experimental/scie/rules.py
pex_binary(
name="hellotyper-pex",
entry_point="hellotyper.main",
dependencies=[":libhellotyper"],
)
scie_binary(
name="hellotyper-scie",
dependencies=[":hellotyper-pex"],
)
It's early days, need to pull a bunch of hardcoded stuff into the target's fieldset - and the goal here is not a comprehensive plugin, but rather a practical 80/20 one (e.g. can it create a standalone binary for CLIs and Application Servers is probably my target wheelhouse). Aiming to have scie
binaries for all of the example python applications by tonight or tomorrowwide-midnight-78598
04/06/2023, 3:13 PMpex
support the same platforms you're cross-building too), but pretty cool already.
scie_binary(
name="hellonumpy-scie",
dependencies=[":hellonumpy-pex"],
platforms=["linux-x86_64", "macos-aarch64"]
)
wide-midnight-78598
04/06/2023, 3:15 PMuvicorn
binary to FastAPIrefined-addition-53644
04/06/2023, 5:13 PMwide-midnight-78598
04/06/2023, 5:15 PMrefined-addition-53644
04/06/2023, 5:27 PMscie_binary
ensures we are building correct platform specific pex? I didn’t really understand it. Are you passing something like --complete-platform
option?wide-midnight-78598
04/06/2023, 5:30 PMscie
-stuff does all of this, and I'm just wrapping it for more Pants friendly usage for one of my client pipelines. I think the end goal is that this is all built into pex
or similar tooling later on.
scie_binary(
name="hellotyper-scie",
dependencies=[":hellotyper-pex"],
platforms=["linux-x86_64", "macos-aarch64"]
)
wide-midnight-78598
04/06/2023, 5:31 PMwide-midnight-78598
04/06/2023, 5:33 PMrefined-addition-53644
04/06/2023, 5:33 PMscie
will ensure that when you are building pex_binary it would generate the platform specific pex?wide-midnight-78598
04/06/2023, 5:34 PMpex_binary
- though, I suppose we could enforce that in scie_binary
rather than verify it? Huh, never really thought about that