Skip to content

gh-128039: Clarify the uninstallation instructions for Mac. #128040

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions Doc/using/mac.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,23 @@ Close this terminal window and the installer window.

A default install will include:

* A |usemac_applications_folder_name| folder in your :file:`Applications` folder. In here
you find :program:`IDLE`, the development environment that is a standard part of official
Python distributions; and :program:`Python Launcher`, which handles double-clicking Python
scripts from the macOS `Finder <https://support.apple.com/en-us/HT201732>`_.

* A framework :file:`/Library/Frameworks/Python.framework`, which includes the
Python executable and libraries. The installer adds this location to your shell
path. To uninstall Python, you can remove these three things.
Symlinks to the Python executable are placed in :file:`/usr/local/bin/`.
* A |usemac_applications_folder_name| folder in your :file:`Applications` folder;

* Within the |usemac_applications_folder_name| folder: :program:`IDLE`, the development environment that is a standard part of official Python distributions;

* Also within the |usemac_applications_folder_name| folder: :program:`Python Launcher`, which handles double-clicking Python scripts from the macOS `Finder <https://support.apple.com/en-us/HT201732>`_;

* A :file:`3.13` folder (under the "framework" :file:`/Library/Frameworks/Python.framework`), which includes the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than hardcoding 3.13 which is only correct for a single branch, let's use a "replacement":

Suggested change
* A :file:`3.13` folder (under the "framework" :file:`/Library/Frameworks/Python.framework`), which includes the
* A |usemac_x_dot_y_literal| folder (under the "framework" :file:`/Library/Frameworks/Python.framework`), which includes the

And add it with the others in this file:

 .. |usemac_x_dot_y| replace:: 3.13
+.. |usemac_x_dot_y_literal| replace:: ``3.13``
 .. |usemac_python_x_dot_y_literal| replace:: ``python3.13``
 .. |usemac_python_x_dot_y_t_literal| replace:: ``python3.13t``
 .. |usemac_python_x_dot_y_t_literal_config| replace:: ``python3.13t-config``

And actually, those are still hardcoded, so let's remove the usemac_ prefix and integrate them into the rst_epilog which uses the current version number:

cpython/Doc/conf.py

Lines 77 to 80 in be8ae08

rst_epilog = f"""
.. |python_version_literal| replace:: ``Python {version}``
.. |python_x_dot_y_literal| replace:: ``python{version}``
.. |usr_local_bin_python_x_dot_y_literal| replace:: ``/usr/local/bin/python{version}``

The rst_epilog replacements are available for all pages.

Copy link
Contributor Author

@offby1 offby1 Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is surely The Right Thing®, but I'm unfamiliar enough with ReStructured Text to do it myself (I took a stab at it and found myself going in circles after an hour).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine, we can do it in a followup. Thank you for trying!

Python executable and libraries (the installer adds this location to your shell
path);

* Symlinks to the above Python executable, placed in :file:`/usr/local/bin/`.

If you selected the Free-threaded Python option (:ref:`install-freethreaded-macos`), the installation will also include:

* A :file:`3.13` folder under :file:`/Library/Frameworks/PythonT.framework`.

To uninstall Python, you can remove the above things.

.. note::

Expand Down
Loading