packaging
packaging copied to clipboard
Add `packaging.tags.interpreter_abi`
Build backends that build extension modules will want to know the interpreter tag for the current interpreter.
Currently, the easiest way to achieve that is via sys_tags
:
next(tags.sys_tags()).abi
packaging
could provide a packaging.tags.interpreter_tag
function that avoids going through sys_tags
.
So you just want the running interpreter's most strict ABI tag? Or are you after all supported ABI tags?
Yes. In practice, this is only relevant to CPython right now, where debug builds can load both debug and non-debug modules, but we want the debug tag in that case.
Yes.
"Yes", which? Most strict or all tags?
xref https://github.com/python/cpython/issues/103483
In any case, packaging will probably end up implementing the linked issue in order to provide a backport for currently supported python interpreters ?
The question raised by @brettcannon leads me to other questions.
I guess the original intent is for most specific tag in order to ease non-pure wheel building/tagging: ref https://github.com/python/cpython/issues/99560 (cc @mattip)
Does this means that cp3?-abi3-
will be left-out or should multiple tags be reported ?
I would think "most strict" would be sufficient for packaging to determine the logic for the rest of the tags, as is done in PR #611.