One question, I have the following problem. I am n...
# general
s
One question, I have the following problem. I am not sure the best way to solve it so maybe someone has an idea. I have created a docker image, the main app of this image is packaged as pex. However, the environment where it will run only has a python interpreter different from my local version, this causes my packaged version to fail. Is there a way to create my pex so that it can be run in a different interpreter from where I compile the pex?
h
a
That’s so painful to use. Not only does it require you to specify everything, but it has to be done for every pex_binary.
in hopefully 2.15, you can tell Pants to do a build like
pex_binary
via Docker
🙏 1
a
But you still need to set it per BUILD file, if I’m not missing something? (re
__defaults__
)
h
you don't, defaults applies to the whole subtree of BUILD files
a
Okay, so we have to put
BUILD
file in the root, got it. “current subtree” was the bit I missed, thanks
h
you can put it in the root, or wherever makes sense. i'm expanding the docs at https://github.com/pantsbuild/pants/pull/16377
a
We’re probably not going to be using this, as there’s no way to build multiarch docker images anyway, and our PEX files are already absolutely monstrous.
But we did consider it 🙂
h
a
Using
platforms
to build multiarch images.
We’d need to have two jobs for packaging anyway, so there’s no benefit to bloating the pex files
Or, well, three jobs 😞