From 2daef15bb4cbf3217f3181f142348185d4de4705 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Wed, 19 Mar 2025 14:00:06 +0100 Subject: [PATCH 1/4] Add link to Pyodide's ffi docs --- peps/pep-0776.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/peps/pep-0776.rst b/peps/pep-0776.rst index 0cf88b63507..cf3f88bc2f9 100644 --- a/peps/pep-0776.rst +++ b/peps/pep-0776.rst @@ -731,7 +731,9 @@ Because Emscripten supports POSIX, a significant number of tasks can be achieved using the ``os`` module. However, many fundamental operations in JavaScript runtimes are not possible via POSIX APIs. Pyodide's approach is to specify a mapping between the JavaScript object model and the Python object model and a -calling convention that allows high level bidirectional integration. +calling convention that allows high level bidirectional integration. `See the +Pyodide documentation here +`__. Asyncio ~~~~~~~ From a16692639482f86b5e47596ddeadc99758ce89d8 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Wed, 19 Mar 2025 14:10:44 +0100 Subject: [PATCH 2/4] Add text defining terms "Pyodide" and "Emscripten Python" --- peps/pep-0776.rst | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/peps/pep-0776.rst b/peps/pep-0776.rst index cf3f88bc2f9..05ffec4bdad 100644 --- a/peps/pep-0776.rst +++ b/peps/pep-0776.rst @@ -72,6 +72,37 @@ Packaging Goals Emscripten Platform Information =============================== +"Pyodide" vs "Emscripten Python" +-------------------------------- + +For the sake of this document, we use the term "Emscripten Python" to refer to +the Emscripten Python maintained in the ``python/cpython`` repository, without +any downstream additions. We contrast the features present in Emscripten Python +to the features present in Pyodide. + +Pyodide is maintained `on github `__ and +distributed via `jsDelivr `__, `npm +`__, and `github releases +`__. + +Emscripten Python is not distributed, but it is possible to build and test by +executing the following commands from the root of the CPython repository: + +.. code-block:: sh + + # Install Emscripten + git clone emscripten/emsdk + ./emsdk/emsdk install 4.0.5 + ./emsdk/emsdk activate 4.0.5 + source ./emsdk/emsdk_env.sh + + # Build + python3.12 ./Tools/wasm/emscripten/ build + + # Run the test suite + ./cross-build/wasm32-emscripten/build/python/python.sh -m test + + Background on Emscripten ------------------------ From 1173e6421040490c365b7a5259c5d0796c37e088 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Thu, 20 Mar 2025 11:11:17 +0100 Subject: [PATCH 3/4] Replace build instructions with link to devguide --- peps/pep-0776.rst | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/peps/pep-0776.rst b/peps/pep-0776.rst index 05ffec4bdad..215d4ac6827 100644 --- a/peps/pep-0776.rst +++ b/peps/pep-0776.rst @@ -85,23 +85,9 @@ distributed via `jsDelivr `__, `npm `__, and `github releases `__. -Emscripten Python is not distributed, but it is possible to build and test by -executing the following commands from the root of the CPython repository: - -.. code-block:: sh - - # Install Emscripten - git clone emscripten/emsdk - ./emsdk/emsdk install 4.0.5 - ./emsdk/emsdk activate 4.0.5 - source ./emsdk/emsdk_env.sh - - # Build - python3.12 ./Tools/wasm/emscripten/ build - - # Run the test suite - ./cross-build/wasm32-emscripten/build/python/python.sh -m test - +Emscripten Python is not distributed, but it is possible to build `by following +the instructions in the devguide +`__ Background on Emscripten ------------------------ From e6a210c8457ff877ddde2477224980a840b30c06 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Wed, 26 Mar 2025 13:27:00 +0100 Subject: [PATCH 4/4] Apply hugovk's edits Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- peps/pep-0776.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/peps/pep-0776.rst b/peps/pep-0776.rst index 215d4ac6827..ac338af70bb 100644 --- a/peps/pep-0776.rst +++ b/peps/pep-0776.rst @@ -80,9 +80,9 @@ the Emscripten Python maintained in the ``python/cpython`` repository, without any downstream additions. We contrast the features present in Emscripten Python to the features present in Pyodide. -Pyodide is maintained `on github `__ and +Pyodide is maintained `on GitHub `__ and distributed via `jsDelivr `__, `npm -`__, and `github releases +`__, and `GitHub releases `__. Emscripten Python is not distributed, but it is possible to build `by following @@ -749,7 +749,7 @@ using the ``os`` module. However, many fundamental operations in JavaScript runtimes are not possible via POSIX APIs. Pyodide's approach is to specify a mapping between the JavaScript object model and the Python object model and a calling convention that allows high level bidirectional integration. `See the -Pyodide documentation here +Pyodide documentation `__. Asyncio