If you use `pex --platform` or the equivalent `pyt...
# pex
e
If you use
pex --platform
or the equivalent
python_binary.platforms
BUILD configuration from Pants, please consider reading and chiming in on https://github.com/pantsbuild/pex/issues/781#issuecomment-552215761 TLDR: I'd like to remove pex support for inexact platforms like
--platform=linux-x86_64
and require exact platforms like
--platform=linux-x86_64-cp-27-mu
. If inexact platforms like
linux-x86_64
are desired, I'd like to move support for those up into Pants or local Pants customizations through target/target macro plugins.
👌 1
👍 3
r
I’d also like to yank the --manylinux flag from the cli since that is the equivalent of just specifying an explicit platform like manylinux2010-x86_64-cp-36-m instead of linux-x86_64-cp-36-m.
I don’t think that’s true at all?
i.e. manylinux is not a platform type at all, it’s a flagged-on mode of seeing additional, more tightly spec’d linux-x86_64 bins?
IIRC, the platform in any manylinux resolution case is always e.g. linux-x86_64 - it just expands to also consider manylinux bins if the system is deemed manylinux compatible.
but I think it should be safe to kill the flag itself and just keep the implicit behavior - that was always to permit operational control over the behavior as we rolled it out.
e
IIRC, the platform in any manylinux resolution case is always e.g. linux-x86_64 - it just expands to also consider manylinux bins if the system is deemed manylinux compatible.
Yes. If used correctly, the manylinux compatible bit should be flagged on by appropriate local system checks. If, however, we're resolving for a foreign platform, compatibility is unknowable except by the user. They must say: trust me, manylinux1 compatible (or manylinux2010 compatible, or...). So they must say this in the exact platfrom string and the bool is simply not suitable.
We were most definitely not doing this correctly previously.
r
I think that was the entire point of the --manylinux flag to pex - to provide this signal to the resolver for the case of e.g. conducting a linux pex build on an OSX machine.
with a default to True, since most linux systems are compatible (thats sort of the point)
but it would never, ever occur to me to pass e.g.
--platform=manylinux-x86_64
as a flag and expect it to match e.g.
linux-x86_64
bins as well. maybe it should have tho? unclear - just sharing my mental view.
no precedent for that mode of thinking that I’m aware of.
so fundamentally, inferring it in pants/pex never made much sense (aside from the runtime check iirc?) - since builds run on whichever platform, so flag-fixing it kept it portable.
not sure how we could’ve been more correct than that?
e
I thought about this alot and its spurred one question that I'll ask afresh out on pex.