From: Stefano Rivera <stefanor@debian.org>
Date: Wed, 29 Sep 2021 20:42:49 -0700
Subject: docs: Allow gen_doc_pages to run without an installed pipx

Forwarded: https://github.com/pypa/pipx/pull/745
---
 scripts/gen_doc_pages.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gen_doc_pages.py b/scripts/gen_doc_pages.py
index ecab566..5aa304d 100644
--- a/scripts/gen_doc_pages.py
+++ b/scripts/gen_doc_pages.py
@@ -11,7 +11,7 @@ from pipx.main import __version__
 
 
 def get_help(cmd: Optional[str]) -> str:
-    base = ["pipx"]
+    base = [sys.executable, "-m", "pipx"]
     args = base + ([cmd] if cmd else []) + ["--help"]
     env_patch = os.environ.copy()
     env_patch["PATH"] = os.pathsep.join([str(Path(sys.executable).parent)] + env_patch["PATH"].split(os.pathsep))
