Skip to content

Commit d33b1ab

Browse files
committed
Replace replacements with parsed literal blocks
1 parent f5ac18e commit d33b1ab

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

Doc/conf.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@
8383
.. |python_x_dot_y_t_literal_config| replace:: ``python{version}t-config``
8484
.. |applications_python_version_literal| replace:: ``/Applications/Python {version}/``
8585
.. |usr_local_bin_python_x_dot_y_literal| replace:: ``/usr/local/bin/python{version}``
86-
.. |usemac_export_path| replace:: ``export PATH="/Library/Frameworks/PythonT.framework/Versions/{version}/bin":"$PATH"``
87-
.. |usemac_alias_py_x_dot_y| replace:: ``alias py{version}="/Library/Frameworks/Python.framework/Versions/{version}/bin/python{version}"``
88-
.. |usemac_alias_py_x_dot_y_t| replace:: ``alias py{version}t="/Library/Frameworks/PythonT.framework/Versions/{version}/bin/python{version}t"``
8986
9087
.. Apparently this how you hack together a formatted link:
9188
(https://www.docutils.org/docs/ref/rst/directives.html#replacement-text)

Doc/using/mac.rst

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -302,19 +302,27 @@ Known cautions and limitations:
302302

303303
- To install a package using :command:`pip` without a :command:`venv`:
304304

305-
|python_x_dot_y_t_literal| ``-m pip install <package_name>``
305+
.. parsed-literal::
306+
307+
python\ |version|\ t -m pip install <package_name>
306308
307309
- When working with multiple Python environments, it is usually safest and easiest
308310
to :ref:`create and use virtual environments <tut-venv>`.
309311
This can avoid possible command name conflicts and confusion about which Python is in use:
310312

311-
|python_x_dot_y_t_literal| ``-m venv <venv_name>``
313+
.. parsed-literal::
314+
315+
python\ |version|\ t -m venv <venv_name>
316+
312317
313318
then :command:`activate`.
314319

315320
- To run a free-threaded version of IDLE:
316321

317-
|python_x_dot_y_t_literal| ``-m idlelib``
322+
.. parsed-literal::
323+
324+
python\ |version|\ t -m idlelib
325+
318326
319327
- The interpreters in both builds respond to the same
320328
:ref:`PYTHON environment variables <using-on-envvars>`
@@ -335,7 +343,9 @@ Known cautions and limitations:
335343
you can explicitly set your shell ``PATH`` environment variable to
336344
include the ``PythonT`` framework ``bin`` directory:
337345

338-
|usemac_export_path|
346+
.. parsed-literal::
347+
348+
export PATH="/Library/Frameworks/PythonT.framework/Versions/\ |version|\ /bin":"$PATH"
339349
340350
The traditional framework installation by default does something similar,
341351
except for :file:`Python.framework`. Be aware that having both framework ``bin``
@@ -346,9 +356,10 @@ Known cautions and limitations:
346356
can help avoid such ambiguities. Another option might be to create
347357
a shell :command:`alias` to the desired interpreter, like:
348358

349-
|usemac_alias_py_x_dot_y|
359+
.. parsed-literal::
350360
351-
|usemac_alias_py_x_dot_y_t|
361+
alias py\ |version|\ ="/Library/Frameworks/Python.framework/Versions/\ |version|\ /bin/python\ |version|\ "
362+
alias py\ |version|\ t="/Library/Frameworks/PythonT.framework/Versions/\ |version|\ /bin/python\ |version|\ t"
352363
353364
Installing using the command line
354365
---------------------------------

0 commit comments

Comments
 (0)