Skip to content

Commit e5f12da

Browse files
authored
Document that there are alternative dev containers (#1675)
Purposefully didn't go into too much detail as it's a bit of an advanced topic. As well, fix a warning being triggered from `conf.py`.
1 parent 49b4fe7 commit e5f12da

File tree

2 files changed

+32
-14
lines changed

2 files changed

+32
-14
lines changed

conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,11 @@
225225
ogp_site_url = "https://devguide.python.org/"
226226
ogp_site_name = "Python Developer's Guide"
227227
ogp_image = "_static/og-image-200x200.png"
228-
ogp_custom_meta_tags = [
228+
ogp_custom_meta_tags = (
229229
'<meta property="og:image:width" content="200">',
230230
'<meta property="og:image:height" content="200">',
231231
'<meta name="theme-color" content="#3776ab">',
232-
]
232+
)
233233

234234
# Strip the dollar prompt when copying code
235235
# https://sphinx-copybutton.readthedocs.io/en/latest/use.html#strip-and-configure-input-prompts-for-code-cells

getting-started/setup-building.rst

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -386,24 +386,26 @@ compiler just like building for :ref:`Unix <unix-compiling>` as well as:
386386
1. A C compiler that can target WebAssembly (for example, `WASI SDK`_)
387387
2. A WASI host/runtime (for example, Wasmtime_)
388388

389-
All of this is provided in the :ref:`devcontainer <using-a-container>`. You can
390-
also use what's installed in the container as a reference of what versions of
391-
these tools are known to work.
389+
All of this is provided in the WASI :ref:`dev container <using-a-container>`
390+
(which you can select as an alternative container when using a
391+
:ref:`codespace <codespaces-whats-codespaces>`). You can also use what's
392+
installed in the container as a reference of what versions of these tools are
393+
known to work.
392394

393395
.. note::
394396

395397
CPython has only been verified with the certain tools for WASI. Using
396398
other compilers, hosts, or WASI versions *should* work, but the tools
397-
and their versions specified in the container are tested via a
398-
:ref:`buildbot <buildbots>`.
399+
and their versions specified in the container and build scripts are
400+
tested via a :ref:`buildbot <buildbots>`.
399401

400402
Building for WASI requires doing a cross-build where you have a *build* Python
401403
to help produce a WASI build of CPython (technically it's a "host x host"
402404
cross-build because the build Python is also the target Python while the host
403405
build is the WASI build). This means you effectively build CPython twice: once
404406
to have a version of Python for the build system to use and another that's the
405-
build you ultimately care about (that is, the build Python is not meant for use by
406-
you directly, only the build system).
407+
build you ultimately care about (that is, the build Python is not meant for use
408+
by you directly, only the build system).
407409

408410
The easiest way to get a debug build of CPython for WASI is to use the
409411
``Tools/wasm/wasi.py build`` command (which should be run w/ a recent version of
@@ -1206,10 +1208,24 @@ You first need to navigate to the
12061208

12071209
Then you will need to:
12081210

1209-
1. Press the ``,`` key to launch the codespace setup screen for the current
1210-
branch (alternatively, click the green :guilabel:`Code` button and choose
1211-
the ``codespaces`` tab and then press the
1212-
green :guilabel:`Create codespace on main` button).
1211+
1. Launch the codespace
1212+
1213+
- Press the ``,`` key to launch the codespace setup screen for the current
1214+
branch
1215+
1216+
- For the default dev container (which is what you very likely want), click
1217+
the green :guilabel:`Create new codespace` button
1218+
- For alternative containers, click :guilabel:`Change options` and
1219+
choose the appropriate container
1220+
1221+
- Alternatively, click the green :guilabel:`Code` button and choose
1222+
the :guilabel:`codespaces` tab
1223+
1224+
- For the default dev container (which is what you very likely want), click
1225+
the green :guilabel:`Create codespace on main` button
1226+
- For alternative containers, go to the :guilabel:`` menu and choose
1227+
:guilabel:`New with options…`
1228+
12131229
2. A screen should appear that lets you know your codespace is being set up.
12141230
(Note: Since the CPython devcontainer is provided, codespaces will use the
12151231
configuration it specifies.)
@@ -1250,7 +1266,9 @@ This is meant for users who have (or want to get) some experience
12501266
with containers.
12511267
These instructions assume a Unix-like environment with
12521268
`Docker <https://www.docker.com/>`__ or `Podman <https://podman.io/>`__
1253-
installed.
1269+
installed. The instructions also assume you want the default dev container;
1270+
tweak the commands as appropriate if you want to use an alternative container
1271+
(e.g. the WASI dev container).
12541272

12551273
.. _devcontainer-image:
12561274

0 commit comments

Comments
 (0)