From e7cc16aa3e0b1f5752caae8eec1bfaf705d32dc2 Mon Sep 17 00:00:00 2001 From: Travis Fortney <4909047+travisfortney@users.noreply.github.com> Date: Fri, 16 Oct 2026 20:13:44 -0400 Subject: [PATCH 1/2] docs: correct the try_first_with executable example --- docs/changelog/+standalone-executable-path.doc.rst | 1 + docs/how-to/standalone-usage.rst | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 docs/changelog/+standalone-executable-path.doc.rst diff --git a/docs/changelog/+standalone-executable-path.doc.rst b/docs/changelog/+standalone-executable-path.doc.rst new file mode 100644 index 0000000..9801000 --- /dev/null +++ b/docs/changelog/+standalone-executable-path.doc.rst @@ -0,0 +1 @@ +Clarify the executable paths accepted by ``try_first_with`` in the standalone usage example. diff --git a/docs/how-to/standalone-usage.rst b/docs/how-to/standalone-usage.rst index 0e2e996..66a311b 100644 --- a/docs/how-to/standalone-usage.rst +++ b/docs/how-to/standalone-usage.rst @@ -1,10 +1,10 @@ How-to guides ============= -Search specific directories first ------------------------------------ +Try specific executables first +------------------------------ -If you know a likely location for the interpreter, pass it via ``try_first_with`` to check there +If you know the path to an interpreter executable, pass it via ``try_first_with`` to check it before the normal search. This is useful when you have a custom Python install outside the standard locations. @@ -12,7 +12,7 @@ standard locations. from python_discovery import get_interpreter - info = get_interpreter("python3.12", try_first_with=["/opt/python/bin"]) + info = get_interpreter("python3.12", try_first_with=["/opt/python/bin/python3.12"]) if info is not None: print(info.executable) From 99acdf94fda1e42760c95dad17018c50e11076c2 Mon Sep 17 00:00:00 2001 From: Travis Fortney <4909047+travisfortney@users.noreply.github.com> Date: Fri, 16 Oct 2026 20:15:23 -0400 Subject: [PATCH 2/2] docs: number the news fragment for PR 150 --- .../{+standalone-executable-path.doc.rst => 150.doc.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/changelog/{+standalone-executable-path.doc.rst => 150.doc.rst} (100%) diff --git a/docs/changelog/+standalone-executable-path.doc.rst b/docs/changelog/150.doc.rst similarity index 100% rename from docs/changelog/+standalone-executable-path.doc.rst rename to docs/changelog/150.doc.rst