abundant-autumn-67998
01/05/2023, 5:20 PM--complete-platform=cp.json
with --resolve-local-platforms
. Say I have compatible_tags: ['a', 'b']
in my cp.json
and I'm trying to build an sdist. Also assume my current platform can build b
tagged wheels. I expect the build to work but it fails. Using the latest pex 2.1.119.
However if I move b
to the front of the list compatible_tags: ['b', 'a']
, the same command works. This seems like a bug? Or am I missing something about how compatible tags are supposed to work?enough-analyst-54434
01/05/2023, 5:31 PMenough-analyst-54434
01/05/2023, 5:31 PMenough-analyst-54434
01/05/2023, 5:35 PMpex3 interpreter ...
and never need editing. The tags are ordered and the ordering comes from PyPA packaging - it should be authoritative and correct.
2. --resolve-local-platforms says, please completely ignore complete platforms if you can instead find a local interpreter that exactly matches. If so, then use that interpreter from there forward ignoring complete platform.
3. When building an sdist, the information in complete platforms is not used / relevant at all, at that point you've hit 2. If you're actually still using a complete platform and not a local interpreter, no sdists can be built at all, only pre-built wheels used.enough-analyst-54434
01/05/2023, 5:36 PM--resolve-local-platforms
? You have sdists you do not wish to pre-build wheels for for some platforms?abundant-autumn-67998
01/05/2023, 6:54 PMpex3 interpreter ...
. Yes we have sdists we can't pre-build, since they are user specified dependencies. I know my build environment can build wheels that are compatible with the target environment because when I use --platform=
it builds the wheels from the sdist and the generated pex works in target environment.
However when I specify a --complete-platform=complete-platform-generated-on-target.json
, pex refuses to build the wheel and fails. The behavior I'm looking for is:
If the build environment cannot build a wheel compatible with the target -> then fail
If the build environment can build a compatible wheel -> build sdist into wheel
However I see it fail even in a build environment that can generate compatible wheels. I understand the order is most to least specific, but I do not expect the first tag to be special? Eg if I have ['a', 'b', 'c']
and the build env can build a b
wheel, it should proceed with the build.abundant-autumn-67998
01/05/2023, 7:02 PMcompatible_tags: ['b', 'c']
worked, I expect a broader compatible_tags: ['a', 'b', 'c']
to also work, but it didn't.abundant-autumn-67998
01/05/2023, 7:16 PMabundant-autumn-67998
01/05/2023, 7:41 PMcomplete_platform
, not just `complete_platform.platform`:
https://github.com/pantsbuild/pex/blob/7a2db79f12e747b173fd34f12af03934fe513a14/pex/resolve/target_configuration.py#L205-L207abundant-autumn-67998
01/06/2023, 1:14 AMenough-analyst-54434
01/06/2023, 1:53 AM