From a2b0eb683821ec4f16f953de76aef58378767d05 Mon Sep 17 00:00:00 2001 From: Phil Elson Date: Fri, 3 Feb 2023 12:00:14 +0100 Subject: [PATCH 1/3] Document the limitations of the pip install --prefix argument, and cross-reference the --python flag, which can be harder to find due to it being a pip level argument --- src/pip/_internal/commands/install.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py index cecaac2bc5b..739de020dda 100644 --- a/src/pip/_internal/commands/install.py +++ b/src/pip/_internal/commands/install.py @@ -156,7 +156,12 @@ def add_options(self) -> None: default=None, help=( "Installation prefix where lib, bin and other top-level " - "folders are placed" + "folders are placed. Note that the resulting installation may " + "contain scripts and other resources which reference the " + "Python interpreter of pip, and not that of ``--prefix``. " + "See also the ``--python`` option if the intention is to " + "install packages into another (possibly pip-free) " + "environment." ), ) From f12a2ef2a216315e1e65a844f855f15600e13cfd Mon Sep 17 00:00:00 2001 From: Phil Elson Date: Thu, 9 Feb 2023 13:17:07 +0100 Subject: [PATCH 2/3] Include a news item for the documentation change --- news/11775.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/11775.doc.rst diff --git a/news/11775.doc.rst b/news/11775.doc.rst new file mode 100644 index 00000000000..d4eff89c000 --- /dev/null +++ b/news/11775.doc.rst @@ -0,0 +1 @@ +Cross-reference the --python flag in the docs for the --prefix flag, and mention the --prefix limitations with regards to installed console scripts. From e399d7d4ede3f5fad6a3f58b97dbae532daf5e19 Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Thu, 9 Feb 2023 20:21:11 +0800 Subject: [PATCH 3/3] Doc formatting --- news/11775.doc.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/news/11775.doc.rst b/news/11775.doc.rst index d4eff89c000..18274b7692a 100644 --- a/news/11775.doc.rst +++ b/news/11775.doc.rst @@ -1 +1,2 @@ -Cross-reference the --python flag in the docs for the --prefix flag, and mention the --prefix limitations with regards to installed console scripts. +Cross-reference the ``--python`` flag from the ``--prefix`` flag, +and mention limitations of ``--prefix`` regarding script installation.