A follow-up to <my previous thread>: <https://gith...
# general
r
A follow-up to my previous thread: https://github.com/a-scie/lift/issues/116#issuecomment-2574242952 It seems that Pants does not capture the output filename modified by new PEX options like
--scie-name-style=platform-file-suffix
and
--scie-only
. Would there be any workaround on this? Or, is there other way to append the platform suffix like
-linux-aarch64
from the Pants side when setting the output filename of
pex_binary
target (e.g.,
${target_name_normalized}-${target_platform}
)?
https://github.com/pantsbuild/pants/blob/10a169939801bb2149423cd17298571e35c4e341/src/python/pants/core/goals/package.py#L69 hmmm... is there a way to add additional params here without changing the pants itself (e.g., as plugin) to inject
platform.value
?
Or, if I could run the following in a build macro:
Copy code
>>> import pants
>>> from pants.engine.platform import Platform
>>> Platform.create_for_localhost()
<Platform.linux_arm64: 'linux_arm64'>
it would also suffice my need, but Pants prohibits import anything there..
When writing plugin rules, the official doc recommends to make an explicit "request" for the platform information (to ensure it's resolved from the internal dependency tree). I think this is fine, but it would be nice if I could interpolate it when mangling output file names to make platform-specific executables.
For now, I just workarounded by manually suffixing the build result in the GHA workflow. https://github.com/lablup/backend.ai/pull/3377/commits/95794737b5aa54f580dd6e7ca2aea88daff98e64