Skip to content

Commit 0016c13

Browse files
committed
Use parsed literal blocks for 'Installing using the command line'
1 parent d33b1ab commit 0016c13

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

Doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
.. |python_x_dot_y_literal| replace:: ``python{version}``
8282
.. |python_x_dot_y_t_literal| replace:: ``python{version}t``
8383
.. |python_x_dot_y_t_literal_config| replace:: ``python{version}t-config``
84+
.. |x_dot_y_b2_literal| replace:: ``{version}.0b2``
8485
.. |applications_python_version_literal| replace:: ``/Applications/Python {version}/``
8586
.. |usr_local_bin_python_x_dot_y_literal| replace:: ``/usr/local/bin/python{version}``
8687

Doc/using/mac.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -370,22 +370,22 @@ the macOS command line :command:`installer` utility lets you select non-default
370370
options, too. If you are not familiar with :command:`installer`, it can be
371371
somewhat cryptic (see :command:`man installer` for more information).
372372
As an example, the following shell snippet shows one way to do it,
373-
using the ``3.13.0b2`` release and selecting the free-threaded interpreter
373+
using the |x_dot_y_b2_literal| release and selecting the free-threaded interpreter
374374
option:
375375

376-
.. code-block:: sh
376+
.. parsed-literal::
377377
378-
RELEASE="python-3.13.0b2-macos11.pkg"
378+
RELEASE="python-\ |version|\ 0b2-macos11.pkg"
379379
380380
# download installer pkg
381-
curl -O https://www.python.org/ftp/python/3.13.0/${RELEASE}
381+
curl -O \https://www.python.org/ftp/python/\ |version|\ .0/${RELEASE}
382382
383383
# create installer choicechanges to customize the install:
384-
# enable the PythonTFramework-3.13 package
384+
# enable the PythonTFramework-\ |version|\ package
385385
# while accepting the other defaults (install all other packages)
386386
cat > ./choicechanges.plist <<EOF
387387
<?xml version="1.0" encoding="UTF-8"?>
388-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
388+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "\http://www.apple.com/DTDs/PropertyList-1.0.dtd">
389389
<plist version="1.0">
390390
<array>
391391
<dict>
@@ -394,7 +394,7 @@ option:
394394
<key>choiceAttribute</key>
395395
<string>selected</string>
396396
<key>choiceIdentifier</key>
397-
<string>org.python.Python.PythonTFramework-3.13</string>
397+
<string>org.python.Python.PythonTFramework-\ |version|\ </string>
398398
</dict>
399399
</array>
400400
</plist>
@@ -405,19 +405,19 @@ option:
405405
406406
You can then test that both installer builds are now available with something like:
407407

408-
.. code-block:: console
408+
.. parsed-literal::
409409
410410
$ # test that the free-threaded interpreter was installed if the Unix Command Tools package was enabled
411-
$ /usr/local/bin/python3.13t -VV
412-
Python 3.13.0b2 experimental free-threading build (v3.13.0b2:3a83b172af, Jun 5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)]
411+
$ /usr/local/bin/python\ |version|\ t -VV
412+
Python \ |version|\ .0b2 experimental free-threading build (v\ |version|\ .0b2:3a83b172af, Jun 5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)]
413413
$ # and the traditional interpreter
414-
$ /usr/local/bin/python3.13 -VV
415-
Python 3.13.0b2 (v3.13.0b2:3a83b172af, Jun 5 2024, 12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)]
414+
$ /usr/local/bin/python\ |version|\ -VV
415+
Python \ |version|\ .0b2 (v\ |version|\ .0b2:3a83b172af, Jun 5 2024, 12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)]
416416
$ # test that they are also available without the prefix if /usr/local/bin is on $PATH
417-
$ python3.13t -VV
418-
Python 3.13.0b2 experimental free-threading build (v3.13.0b2:3a83b172af, Jun 5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)]
419-
$ python3.13 -VV
420-
Python 3.13.0b2 (v3.13.0b2:3a83b172af, Jun 5 2024, 12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)]
417+
$ python\ |version|\ t -VV
418+
Python \ |version|\ .0b2 experimental free-threading build (v\ |version|\ .0b2:3a83b172af, Jun 5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)]
419+
$ python\ |version|\ -VV
420+
Python \ |version|\ .0b2 (v\ |version|\ .0b2:3a83b172af, Jun 5 2024, 12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)]
421421
422422
.. note::
423423

0 commit comments

Comments
 (0)