packaging icon indicating copy to clipboard operation
packaging copied to clipboard

tags: MacOS base_version via dynlib files

Open pradyunsg opened this issue 4 years ago • 3 comments

macOS version dectection via pep425tags.py uses any dynlib files to determine the base_version of macOS to support in the wheel (see calculate_macosx_platform_tag. packaging does not seem to have this ability.

Originally posted by @mattip in https://github.com/pypa/wheel/pull/346#issuecomment-602106578

And this was one of the biggest road blocks to switching to packaging.

Originally posted by @agronholm in https://github.com/pypa/wheel/pull/346#issuecomment-602174508


This looks like a case of the fork of pep425tags.py in wheel, diverging from the one in pip. Such cases were expected, and (based on a quick skim) I don't see a reason to not add this functionality.

/cc @brettcannon

pradyunsg avatar Apr 01 '20 12:04 pradyunsg

Hi. I'm author of this code to detect minimum macos version. If there are some questions I can try to explain it.

Czaki avatar Apr 01 '20 19:04 Czaki

For reference, the current MacOS-specific platform code in packaging.tags is:

https://github.com/pypa/packaging/blob/ed0a58f0dacf08c871ce7b687558d3891de75ca9/packaging/tags.py#L389-L416

And the MacOS-specific platform code in wheel's pep425tags.py is:

https://github.com/pypa/wheel/blob/bb33181c3b3558f3bdf8dc4a526a64e2f73bcd96/src/wheel/pep425tags.py#L107-L172

There is significant difference (which is why this is a blocker for wheel) and the corresponding wheel PR is https://github.com/pypa/wheel/pull/314.

pradyunsg avatar Apr 01 '20 19:04 pradyunsg

Do note that the code in 'wheel' interrogates built files as part of the making of a wheel which we could never do in order to calculate what tags a running interpreter supports.

So while I'm not opposed to incorporating similar code here, it is a shift in what packaging.tags was initially designed around and so the API shift will need handled appropriately as I don't think this is necessarily a drop-in change in the platform detection code.

brettcannon avatar Apr 02 '20 19:04 brettcannon