Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP 656: Also replace dots to match PEPs 425 and 427 #1882

Merged
merged 1 commit into from
Mar 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions pep-0656.rst
Original file line number Diff line number Diff line change
@@ -110,7 +110,9 @@ in :pep:`600`, including:
1. The distribution works on any mainstream Linux distributions with
musl version ``${MUSLMAJOR}.${MUSLMINOR}`` or later.
2. The distribution's ``${ARCH}`` matches the return value of
``sysconfig.get_platform()`` on the host system.
``sysconfig.get_platform()`` on the host system, replacing period
(``.``) and hyphen (``-``) characters with underscores (``_``), as
outlined in :pep:`425` and :pep:`427`.

Example values::

@@ -124,7 +126,7 @@ The value can be formatted with the following Python code::
def format_musllinux(musl_version: tuple[int, int]) -> str:
os_name, sep, arch = sysconfig.get_platform().partition("-")
assert os_name == "linux" and sep, "Not a Linux"
arch = arch.replace("-", "_")
arch = arch.replace(".", "_").replace("-", "_")
return f"musllinux_{musl_version[0]}_{musl_version[1]}_{arch}"

Recommendations to package indexes
@@ -133,7 +135,7 @@ Recommendations to package indexes
It is recommended for Python package repositories, including PyPI, to
accept platform tags matching the following regular expression::

musllinux_([0-9]+)_([0-9]+)_([^-]+)
musllinux_([0-9]+)_([0-9]+)_([^.-]+)

Python package repositories may impose additional requirements to
reject Wheels with known issues, including but not limited to: