Skip to content

Commit 553c856

Browse files
hoodmanehugovk
andauthored
Apply hugovk's edits
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent 44e36fe commit 553c856

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

getting-started/setup-building.rst

+15-15
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ used in ``python.sh``:
462462
Emscripten
463463
----------
464464

465-
Emscripten_ is a complete open source compiler toolchain. It compiles C/C++ code
465+
Emscripten_ is a complete open-source compiler toolchain. It compiles C/C++ code
466466
into WebAssembly_/JavaScript executables, for use in JavaScript runtimes,
467467
including browsers and Node.js.
468468

@@ -474,10 +474,10 @@ including browsers and Node.js.
474474
To build for Emscripten, you will need to cross-compile CPython. This requires a
475475
C compiler just like building for :ref:`Unix <unix-compiling>` as well as:
476476

477-
1. The Emscripten compiler
478-
2. Node.js
477+
* The Emscripten compiler
478+
* Node.js
479479

480-
The simplest way to install the Emscripten compiler is as follows:
480+
The simplest way to install the Emscripten compiler is:
481481

482482
.. code-block:: sh
483483
@@ -488,7 +488,7 @@ The simplest way to install the Emscripten compiler is as follows:
488488
source ./emsdk/emsdk_env.sh
489489
490490
Building for Emscripten requires doing a cross-build where you have a *build*
491-
Python to help produce a Emscripten build of CPython. This means you build
491+
Python to help produce an Emscripten build of CPython. This means you build
492492
CPython twice: once to have a version of Python for the build system to use and
493493
another that's the build you ultimately care about (that is, the build Python is
494494
not meant for use by you directly, only the build system).
@@ -499,7 +499,7 @@ version of Python you have installed on your machine):
499499

500500
.. code-block:: shell
501501
502-
$ python3 Tools/wasm/emscripten build --quiet -- --config-cache --with-pydebug
502+
python3 Tools/wasm/emscripten build --quiet -- --config-cache --with-pydebug
503503
504504
That single command will configure and build both the build Python and the
505505
Emscripten build in ``cross-build/build`` and
@@ -510,35 +510,35 @@ is a convenience wrapper around the following commands:
510510

511511
.. code-block:: shell
512512
513-
$ python Tools/wasm/emscripten configure-build-python --quiet -- --config-cache --with-pydebug
514-
$ python Tools/wasm/emscripten make-build-python --quiet
515-
$ python Tools/wasm/emscripten make-libffi --quiet
516-
$ python Tools/wasm/emscripten configure-host --quiet -- --config-cache
517-
$ python Tools/wasm/emscripten make-host --quiet
513+
python Tools/wasm/emscripten configure-build-python --quiet -- --config-cache --with-pydebug
514+
python Tools/wasm/emscripten make-build-python --quiet
515+
python Tools/wasm/emscripten make-libffi --quiet
516+
python Tools/wasm/emscripten configure-host --quiet -- --config-cache
517+
python Tools/wasm/emscripten make-host --quiet
518518
519519
.. note::
520520

521521
The ``configure-host`` command infers the use of ``--with-pydebug`` from the
522522
build Python.
523523

524-
Running the separate commands after ``emscripten build`` is useful if you, for example, only want to
525-
run the ``make-host`` step after making code changes.
524+
Running the separate commands after ``emscripten build`` is useful if you, for
525+
example, only want to run the ``make-host`` step after making code changes.
526526

527527
Once everything is complete, there will be a
528528
``cross-build/wasm32-emscripten/build/python/python.sh`` helper file which you
529529
can use to run the ``python.mjs`` file:
530530

531531
.. code-block:: shell
532532
533-
$ cross-build/wasm32-emscripten/build/python/python.sh --version
533+
cross-build/wasm32-emscripten/build/python/python.sh --version
534534
535535
You can also use ``Makefile`` targets and they will work as expected thanks to
536536
the ``HOSTRUNNER`` environment variable having been set to a similar value as
537537
used in ``python.sh``:
538538

539539
.. code-block:: shell
540540
541-
$ make -C cross-build/wasm32-emscripten/build/python/ test
541+
make -C cross-build/wasm32-emscripten/build/python/ test
542542
543543
544544
.. _Emscripten: https://emscripten.org/

0 commit comments

Comments
 (0)