From fa78f51360759ef366df8fd20b57aefca519e8e7 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Fri, 28 Mar 2025 13:00:39 +0100 Subject: [PATCH 01/15] PEP tbd: Emscripten packaging --- peps/pep-tbd.rst | 190 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 peps/pep-tbd.rst diff --git a/peps/pep-tbd.rst b/peps/pep-tbd.rst new file mode 100644 index 00000000000..6659b219f40 --- /dev/null +++ b/peps/pep-tbd.rst @@ -0,0 +1,190 @@ +PEP: tbd +Title: Emscripten Packaging +Author: Hood Chatham +Sponsor: Łukasz Langa +Discussions-To: +Status: Draft +Type: Standards Track +Topic: Packaging +Created: 28-Mar-2025 +Python-Version: 3.14 +Post-History: + +Abstract +======== + +This PEP proposes a new platform tag series `pyodide` for binary Python package +distributions for the Pyodide Python runtime. + +`Emscripten `__ is a complete open source compiler +toolchain. It compiles C/C++ code into WebAssembly/JavaScript executables, for +use in JavaScript runtimes, including browsers and Node.js. The Rust language +also maintains an Emscripten target. + +The goals of this PEP are: + +1. To describe Pyodide's packaging tooling +2. To describe Pyodide's wheel abi to a similar level of detail as the manylinux + PEPs +3. For Pyodide wheels to be allowed for upload to PyPI + + + +Motivation +========== + +Pyodide is a CPython distribution for use in the browser. A web browser is a +universal computing platform, available on Windows, macOS, Linux, and every +smartphone. Hundreds of thousands of students have learned Python through +Pyodide via projects like `Capytale +`__ +and `PyodideU `__. Pyodide +is also increasingly being used by Python packages to provide interactive +documentation. + +Pyodide currently maintains ports of 255 different packages at the time of this +writing, including major scientific Python packages like NumPy, SciPy, pandas, +Polars, scikit-learn, OpenCV, PyArrow, and Pillow as well as general purpose +packages like aiohttp, Requests, Pydantic, cryptography, and orjson. + +About 60 packages are also testing against Pyodide in their CI, including NumPy, +pandas, awkward-cpp, scikit-image, statsmodels, PyArrow, Hypothesis, and PyO3. + +Python package projects cannot deploy binary distributions for Pyodide on PyPI. +Instead they must use other options like ``anaconda.org`` or ``jsdelivr.com``. +This creates friction both for package maintainers and for users. + + +Rationale +========= + +Emscripten uses a variant of musl libc. The Emscripten compiler makes no ABI +stability guarantees between versions. Many Emscripten updates are ABI +compatible by chance, and the Rust Emscripten target behaves as if the ABI were +stable with only `occasional negative consequences +`__. + +There are several linker flags that adjust the Emscripten ABI, so Python +packages built to run with Emscripten must make sure to match the ABI-sensitive +linker flags used to compile the interpreter to avoid load-time or run-time +errors. The Emscripten compiler continuously fixes bugs and adds support for new +web platform features. Thus, there is significant benefit to being able to +update the ABI. + +In order to balance the ABI stability needs of package maintainers with the ABI +flexibility to allow the platform to move forward, Pyodide plans to adopt a new +ABI for each feature release of Python. + +The Pyodide team also coordinates the ABI flags that Pyodide uses with the +Emscripten ABI that Rust supports in order to ensure that we have support for +the many popular Rust packages. Historically, most of the work for this has +been related to unwinding ABIs. See for instance `this Rust Major Change +Proposal `__. + +The ``pyodide`` platform tags only apply to Python interpreters compiled and +linked with the same version of Emscripten as Pyodide, with the same +ABI-sensitive flags. + + +Specification +============= + +The platform tags will take the form:: + + pyodide_${YEAR}_${PATCH}_wasm32 + +Each one of these will be used with a specified Python version. For example, the +platform tag `pyodide_2025_0` will be used with Python 3.13. + +Emscripten Wheel ABI +-------------------- + +The specification of the ``pyodide_`` platform includes: + +* Which version of the Emscripten compiler is used +* What libraries are statically linked with the interpreter +* What stack unwinding ABI is to be used +* Which runtime platform features are required to be present + +and a handful of other similar details that affect the ABI. + +The ABI is selected by choosing the appropriate version of the Emscripten +compiler and passing appropriate compiler and linker flags. It is possible for +other people to build their own Python interpreter that is compatible with the +Pyodide ABI, it is not necessary to use the Pyodide distribution itself. + +The ``pyodide build`` tool knows how to create wheels that match our ABI. Unlike +with manylinux wheels, there is no need for a Docker container to build the +``pyodide_`` wheels. All that is needed is a Linux machine and appropriate +versions of Python, Node.js, and Emscripten. + +It is possible to validate a wheel by installing and importing it into the +Pyodide runtime. Because Pyodide can run in an environment with strong +sandboxing guarantees, doing this produces no security risks. + +Determining the ABI version +--------------------------- + +The Pyodide ABI version is stored in the `PYODIDE_ABI_VERSION` config variable +and can be determined via:: + + pyodide_abi_version = sysconfig.get_config_var("PYODIDE_ABI_VERSION") + + +To generate the list of compatible tags, one can use the following code:: + + from packaging.tags import cpython_tags, _generic_platforms + + def _emscripten_platforms() -> Iterator[str]: + pyodide_abi_version = sysconfig.get_config_var("PYODIDE_ABI_VERSION") + if pyodide_abi_version: + yield f"pyodide_{pyodide_abi_version}_wasm32" + yield from _generic_platforms() + + emscripten_tags = cpython_tags(platforms=_emscripten_platforms()) + +This code will be added to `pypa/packaging +`__. + + +Package Installers +------------------ + +Installers should use the ``_emscripten_platforms()`` function shown above to +determine which platforms are compatible with an Emscripten build of CPython. In +particular, the Pyodide ABI version is exposed via +``sysconfig.get_config_var("PYODIDE_ABI_VERSION")``. + +Package indexes +--------------- + +We recommend that package indexes accept any wheel whose platform tag matches +``pyodide_[0-9]+_[0-9]+_wasm32``. + + +Dependency Specifier Markers +---------------------------- + +To check for the Emscripten platform in a dependency specifier, one can use +``sys_platform == 'emscripten'`` (or its negation). + + +Trove Classifier +---------------- + +Packages that build and test Emscripten wheels can declare this by adding the +``Environment :: WebAssembly :: Emscripten``. PyPI already accepts uploads of +packages with this classifier. + + +Backwards Compatibility +======================= + +There are no backwards compatibility concerns in this PEP. + + +Copyright +========= + +This document is placed in the public domain or under the +CC0-1.0-Universal license, whichever is more permissive. From 47012762f1cc663d74d076c1ca9435ca94ce9d02 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Fri, 28 Mar 2025 13:07:43 +0100 Subject: [PATCH 02/15] Remove Python-Version header --- peps/pep-tbd.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/peps/pep-tbd.rst b/peps/pep-tbd.rst index 6659b219f40..cc44184230f 100644 --- a/peps/pep-tbd.rst +++ b/peps/pep-tbd.rst @@ -7,7 +7,6 @@ Status: Draft Type: Standards Track Topic: Packaging Created: 28-Mar-2025 -Python-Version: 3.14 Post-History: Abstract From 2480cd674da50db3b185a573ee4fe1f2f438d79a Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Fri, 28 Mar 2025 15:27:56 +0100 Subject: [PATCH 03/15] Fix pre-commit --- peps/pep-tbd.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/peps/pep-tbd.rst b/peps/pep-tbd.rst index cc44184230f..b8b8085c160 100644 --- a/peps/pep-tbd.rst +++ b/peps/pep-tbd.rst @@ -2,17 +2,17 @@ PEP: tbd Title: Emscripten Packaging Author: Hood Chatham Sponsor: Łukasz Langa -Discussions-To: +Discussions-To: Status: Draft Type: Standards Track Topic: Packaging Created: 28-Mar-2025 -Post-History: +Post-History: Abstract ======== -This PEP proposes a new platform tag series `pyodide` for binary Python package +This PEP proposes a new platform tag series ``pyodide`` for binary Python package distributions for the Pyodide Python runtime. `Emscripten `__ is a complete open source compiler @@ -93,7 +93,7 @@ The platform tags will take the form:: pyodide_${YEAR}_${PATCH}_wasm32 Each one of these will be used with a specified Python version. For example, the -platform tag `pyodide_2025_0` will be used with Python 3.13. +platform tag ``pyodide_2025_0`` will be used with Python 3.13. Emscripten Wheel ABI -------------------- @@ -124,7 +124,7 @@ sandboxing guarantees, doing this produces no security risks. Determining the ABI version --------------------------- -The Pyodide ABI version is stored in the `PYODIDE_ABI_VERSION` config variable +The Pyodide ABI version is stored in the ``PYODIDE_ABI_VERSION`` config variable and can be determined via:: pyodide_abi_version = sysconfig.get_config_var("PYODIDE_ABI_VERSION") From f3be125b67519c1470b2d87fa5a078eef87f6e16 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Fri, 28 Mar 2025 18:04:18 +0100 Subject: [PATCH 04/15] Mark as pep 783 --- .github/CODEOWNERS | 2 ++ peps/{pep-tbd.rst => pep-0783.rst} | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) rename peps/{pep-tbd.rst => pep-0783.rst} (99%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index cb3558de2ab..0b971e54d3f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -661,6 +661,8 @@ peps/pep-0779.rst @Yhg1s @colesbury @mpage peps/pep-0780.rst @lysnikolaou peps/pep-0781.rst @methane # ... +peps/pep-0783.rst @hoodmane @ambv +# ... peps/pep-0789.rst @njsmith # ... peps/pep-0801.rst @warsaw diff --git a/peps/pep-tbd.rst b/peps/pep-0783.rst similarity index 99% rename from peps/pep-tbd.rst rename to peps/pep-0783.rst index b8b8085c160..34b01279024 100644 --- a/peps/pep-tbd.rst +++ b/peps/pep-0783.rst @@ -1,4 +1,4 @@ -PEP: tbd +PEP: 783 Title: Emscripten Packaging Author: Hood Chatham Sponsor: Łukasz Langa From 3bfdd54f7f6b200beb863bf6105b0cd69233bab5 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Sat, 29 Mar 2025 10:34:12 +0100 Subject: [PATCH 05/15] Apply AA-Turner's edits Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> --- peps/pep-0783.rst | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/peps/pep-0783.rst b/peps/pep-0783.rst index 34b01279024..b177db2f00b 100644 --- a/peps/pep-0783.rst +++ b/peps/pep-0783.rst @@ -20,12 +20,6 @@ toolchain. It compiles C/C++ code into WebAssembly/JavaScript executables, for use in JavaScript runtimes, including browsers and Node.js. The Rust language also maintains an Emscripten target. -The goals of this PEP are: - -1. To describe Pyodide's packaging tooling -2. To describe Pyodide's wheel abi to a similar level of detail as the manylinux - PEPs -3. For Pyodide wheels to be allowed for upload to PyPI @@ -88,9 +82,11 @@ ABI-sensitive flags. Specification ============= -The platform tags will take the form:: +The platform tags will take the form: + +.. code-block:: text - pyodide_${YEAR}_${PATCH}_wasm32 + pyodide_${YEAR}_${PATCH}_wasm32 Each one of these will be used with a specified Python version. For example, the platform tag ``pyodide_2025_0`` will be used with Python 3.13. @@ -125,12 +121,16 @@ Determining the ABI version --------------------------- The Pyodide ABI version is stored in the ``PYODIDE_ABI_VERSION`` config variable -and can be determined via:: +and can be determined via: + +.. code-block:: python + + pyodide_abi_version = sysconfig.get_config_var("PYODIDE_ABI_VERSION") - pyodide_abi_version = sysconfig.get_config_var("PYODIDE_ABI_VERSION") +To generate the list of compatible tags, one can use the following code: -To generate the list of compatible tags, one can use the following code:: +.. code-block:: python from packaging.tags import cpython_tags, _generic_platforms From eb104ba58a9ec2cfc90beb53d1a3792497fb717d Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Sat, 29 Mar 2025 10:35:12 +0100 Subject: [PATCH 06/15] Add pep 776 discussion thread to post-history --- peps/pep-0783.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/peps/pep-0783.rst b/peps/pep-0783.rst index b177db2f00b..94b3a8302c6 100644 --- a/peps/pep-0783.rst +++ b/peps/pep-0783.rst @@ -7,7 +7,7 @@ Status: Draft Type: Standards Track Topic: Packaging Created: 28-Mar-2025 -Post-History: +Post-History: `18-Mar-2025 `__ Abstract ======== @@ -21,8 +21,6 @@ use in JavaScript runtimes, including browsers and Node.js. The Rust language also maintains an Emscripten target. - - Motivation ========== From 3a48dd6f90181bc42d232ee2b70702d91c0143d3 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Wed, 2 Apr 2025 17:54:12 +0200 Subject: [PATCH 07/15] Address Russel's comments --- peps/pep-0783.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/peps/pep-0783.rst b/peps/pep-0783.rst index 94b3a8302c6..bbb5618caa3 100644 --- a/peps/pep-0783.rst +++ b/peps/pep-0783.rst @@ -18,7 +18,8 @@ distributions for the Pyodide Python runtime. `Emscripten `__ is a complete open source compiler toolchain. It compiles C/C++ code into WebAssembly/JavaScript executables, for use in JavaScript runtimes, including browsers and Node.js. The Rust language -also maintains an Emscripten target. +also maintains an Emscripten target. :pep:`776` specifies Python's support for +Emscripten. Motivation @@ -106,10 +107,13 @@ compiler and passing appropriate compiler and linker flags. It is possible for other people to build their own Python interpreter that is compatible with the Pyodide ABI, it is not necessary to use the Pyodide distribution itself. -The ``pyodide build`` tool knows how to create wheels that match our ABI. Unlike -with manylinux wheels, there is no need for a Docker container to build the -``pyodide_`` wheels. All that is needed is a Linux machine and appropriate -versions of Python, Node.js, and Emscripten. +THe Pyodide ABIs are fully specified in the `Pyodide Platform ABI +`__ documentation. + +The ``pyodide build`` tool knows how to create wheels that match the Pyoidde +ABI. Unlike with manylinux wheels, there is no need for a Docker container to +build the ``pyodide_`` wheels. All that is needed is a Linux machine and +appropriate versions of Python, Node.js, and Emscripten. It is possible to validate a wheel by installing and importing it into the Pyodide runtime. Because Pyodide can run in an environment with strong From 46837ecc5402aa2811665a0bd943730a48baa7f5 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Wed, 2 Apr 2025 18:06:10 +0200 Subject: [PATCH 08/15] Be more specific --- peps/pep-0783.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/peps/pep-0783.rst b/peps/pep-0783.rst index bbb5618caa3..f8c3cecdf4a 100644 --- a/peps/pep-0783.rst +++ b/peps/pep-0783.rst @@ -98,9 +98,9 @@ The specification of the ``pyodide_`` platform includes: * Which version of the Emscripten compiler is used * What libraries are statically linked with the interpreter * What stack unwinding ABI is to be used -* Which runtime platform features are required to be present - -and a handful of other similar details that affect the ABI. +* How the loader handles dependency lookup +* That libraries cannot use `-pthread` +* That libraries should be linked with `-sWASM_BIGINT` The ABI is selected by choosing the appropriate version of the Emscripten compiler and passing appropriate compiler and linker flags. It is possible for From cc9c8d94d6812300bfeabd985ad227b456f7337a Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Wed, 2 Apr 2025 18:06:56 +0200 Subject: [PATCH 09/15] Update peps/pep-0783.rst Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> --- peps/pep-0783.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peps/pep-0783.rst b/peps/pep-0783.rst index f8c3cecdf4a..4048d28030e 100644 --- a/peps/pep-0783.rst +++ b/peps/pep-0783.rst @@ -159,7 +159,7 @@ particular, the Pyodide ABI version is exposed via Package indexes --------------- -We recommend that package indexes accept any wheel whose platform tag matches +Package indexes SHOULD accept any wheel whose platform tag matches ``pyodide_[0-9]+_[0-9]+_wasm32``. From 3e4fec750064d37ee317a13741a3d8382249cbc5 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Wed, 2 Apr 2025 18:16:35 +0200 Subject: [PATCH 10/15] Add missing sections --- peps/pep-0783.rst | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/peps/pep-0783.rst b/peps/pep-0783.rst index 4048d28030e..227d456425e 100644 --- a/peps/pep-0783.rst +++ b/peps/pep-0783.rst @@ -99,8 +99,8 @@ The specification of the ``pyodide_`` platform includes: * What libraries are statically linked with the interpreter * What stack unwinding ABI is to be used * How the loader handles dependency lookup -* That libraries cannot use `-pthread` -* That libraries should be linked with `-sWASM_BIGINT` +* That libraries cannot use ``-pthread`` +* That libraries should be linked with ``-sWASM_BIGINT`` The ABI is selected by choosing the appropriate version of the Emscripten compiler and passing appropriate compiler and linker flags. It is possible for @@ -156,7 +156,7 @@ determine which platforms are compatible with an Emscripten build of CPython. In particular, the Pyodide ABI version is exposed via ``sysconfig.get_config_var("PYODIDE_ABI_VERSION")``. -Package indexes +Package Indexes --------------- Package indexes SHOULD accept any wheel whose platform tag matches @@ -184,6 +184,32 @@ Backwards Compatibility There are no backwards compatibility concerns in this PEP. +Security Implications +===================== + +There are no security implications in this PEP. + +How to Teach This +================= + +For Pyodide users, we recommend the `Pyodide documentation on installing +packages `__. + +For package maintainers, we recommend the `Pyodide documentation on building and +testing packages +`__. + +Reference Implementation +======================== + +For building packages, `pyodide build +`__ and `cibuildwheel +`__. + +For installers to decide whether a wheel tag is compatible with a Pyodide +interpreter, `pypa/packaging#804 +`__. + Copyright ========= From 73d0bfc0e54ec50cec589486071c2d786b1163af Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Wed, 2 Apr 2025 18:24:53 +0200 Subject: [PATCH 11/15] Add reference to pep 776 for sys.platform value --- peps/pep-0783.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/peps/pep-0783.rst b/peps/pep-0783.rst index 227d456425e..dbcc241bc02 100644 --- a/peps/pep-0783.rst +++ b/peps/pep-0783.rst @@ -166,8 +166,11 @@ Package indexes SHOULD accept any wheel whose platform tag matches Dependency Specifier Markers ---------------------------- -To check for the Emscripten platform in a dependency specifier, one can use -``sys_platform == 'emscripten'`` (or its negation). +According to `PEP 776 +`__, in Emscripten +Python `sys.platform` returns `"emscripten"`. To check for the Emscripten +platform in a dependency specifier, one can use ``sys_platform == 'emscripten'`` +(or its negation). Trove Classifier From ad4192cd787cef35e90403f33337b7c5cb18a3d8 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Wed, 2 Apr 2025 18:44:55 +0200 Subject: [PATCH 12/15] Add discussion link --- peps/pep-0783.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/peps/pep-0783.rst b/peps/pep-0783.rst index dbcc241bc02..84c1818f8b5 100644 --- a/peps/pep-0783.rst +++ b/peps/pep-0783.rst @@ -2,12 +2,13 @@ PEP: 783 Title: Emscripten Packaging Author: Hood Chatham Sponsor: Łukasz Langa -Discussions-To: +Discussions-To: https://discuss.python.org/t/86862 Status: Draft Type: Standards Track Topic: Packaging Created: 28-Mar-2025 -Post-History: `18-Mar-2025 `__ +Post-History: `02-Apr-2025 `__, + `18-Mar-2025 `__ Abstract ======== @@ -166,11 +167,10 @@ Package indexes SHOULD accept any wheel whose platform tag matches Dependency Specifier Markers ---------------------------- -According to `PEP 776 -`__, in Emscripten -Python `sys.platform` returns `"emscripten"`. To check for the Emscripten -platform in a dependency specifier, one can use ``sys_platform == 'emscripten'`` -(or its negation). +According to :pep:`776#platform-identification`, in Emscripten Python +``sys.platform`` returns ``"emscripten"``. To check for the Emscripten platform in a +dependency specifier, one can use ``sys_platform == 'emscripten'`` (or its +negation). Trove Classifier From e5e3efaed73ceda2c7a9fe096396db2bc653304f Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Thu, 3 Apr 2025 05:35:55 +0100 Subject: [PATCH 13/15] Update peps/pep-0783.rst Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> --- peps/pep-0783.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peps/pep-0783.rst b/peps/pep-0783.rst index 84c1818f8b5..87d0312e0ae 100644 --- a/peps/pep-0783.rst +++ b/peps/pep-0783.rst @@ -8,7 +8,7 @@ Type: Standards Track Topic: Packaging Created: 28-Mar-2025 Post-History: `02-Apr-2025 `__, - `18-Mar-2025 `__ + `18-Mar-2025 `__, Abstract ======== From 89a56a809c81c88dddd67099478c300ad840425d Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Fri, 4 Apr 2025 18:59:47 +0200 Subject: [PATCH 14/15] Update peps/pep-0783.rst Co-authored-by: Juniper Tyree <50025784+juntyr@users.noreply.github.com> --- peps/pep-0783.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peps/pep-0783.rst b/peps/pep-0783.rst index 87d0312e0ae..12741798864 100644 --- a/peps/pep-0783.rst +++ b/peps/pep-0783.rst @@ -111,7 +111,7 @@ Pyodide ABI, it is not necessary to use the Pyodide distribution itself. THe Pyodide ABIs are fully specified in the `Pyodide Platform ABI `__ documentation. -The ``pyodide build`` tool knows how to create wheels that match the Pyoidde +The ``pyodide build`` tool knows how to create wheels that match the Pyodide ABI. Unlike with manylinux wheels, there is no need for a Docker container to build the ``pyodide_`` wheels. All that is needed is a Linux machine and appropriate versions of Python, Node.js, and Emscripten. From a11277d7543a271be053b08458a838e9a8acb8c5 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Mon, 7 Apr 2025 10:10:30 +0200 Subject: [PATCH 15/15] Apply hugovk's edits Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- peps/pep-0783.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/peps/pep-0783.rst b/peps/pep-0783.rst index 12741798864..78fdbf24c80 100644 --- a/peps/pep-0783.rst +++ b/peps/pep-0783.rst @@ -16,7 +16,7 @@ Abstract This PEP proposes a new platform tag series ``pyodide`` for binary Python package distributions for the Pyodide Python runtime. -`Emscripten `__ is a complete open source compiler +`Emscripten `__ is a complete open-source compiler toolchain. It compiles C/C++ code into WebAssembly/JavaScript executables, for use in JavaScript runtimes, including browsers and Node.js. The Rust language also maintains an Emscripten target. :pep:`776` specifies Python's support for @@ -161,7 +161,7 @@ Package Indexes --------------- Package indexes SHOULD accept any wheel whose platform tag matches -``pyodide_[0-9]+_[0-9]+_wasm32``. +the regular expression ``pyodide_[0-9]+_[0-9]+_wasm32``. Dependency Specifier Markers @@ -169,7 +169,7 @@ Dependency Specifier Markers According to :pep:`776#platform-identification`, in Emscripten Python ``sys.platform`` returns ``"emscripten"``. To check for the Emscripten platform in a -dependency specifier, one can use ``sys_platform == 'emscripten'`` (or its +dependency specifier, one can use ``sys_platform == "emscripten"`` (or its negation). @@ -177,8 +177,9 @@ Trove Classifier ---------------- Packages that build and test Emscripten wheels can declare this by adding the -``Environment :: WebAssembly :: Emscripten``. PyPI already accepts uploads of -packages with this classifier. +``Environment :: WebAssembly :: Emscripten`` classifier. PyPI already accepts uploads of +`packages with this classifier +`__. Backwards Compatibility