python / python/cpython

Add self-reporting of PEP 425 tags to sysconfig

Open
#99,560 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

topic-sysconfig type-feature
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

Feature or enhancement

Add pep425_python_tag(), pep425_abi_tag() and pep425_platform_tag() functions to sysconfig so the interpreter can self report.

Pitch

(Explain why this feature or enhancement should be implemented and how it would be used.
Add examples, if applicable.)

PEP 425 proposed three compatibility tags for wheel name formats: "python tag", "abi tag" and "platform tag". These are used when generating the name of a wheel to upload to PyPI and in selecting a wheel to install. Over time generation of these tags was delegated to pypa/packaging/tags.py which probes the current interpreter for information using various heuristics to generate the proper tags. This should be the job of the interpreter to self report.

Previous discussion

This came out of this comment in a PR to change the abi-tag determination, and also would provide the interfaces requested in this PR, this PR, and maybe even this pr.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the PEP 425 link and the referenced packaging/tags.py implementation, then inspect the existing sysconfig module and its tests. Define how the three proposed sysconfig functions should report interpreter compatibility tags, and consider the linked packaging requests before treating the work as done.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.