Skip to content

Commit

Permalink
Restore minimum python verbiage, add constant
Browse files Browse the repository at this point in the history
  • Loading branch information
danyeaw committed Jun 25, 2023
1 parent 82849ed commit 00f12fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/pipx/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
LOCAL_BIN_DIR = Path(os.environ.get("PIPX_BIN_DIR", DEFAULT_PIPX_BIN_DIR)).resolve()
PIPX_VENV_CACHEDIR = PIPX_HOME / ".cache"
TEMP_VENV_EXPIRATION_THRESHOLD_DAYS = 14
MINIMUM_PYTHON_VERSION = "3.8"

ExitCode = NewType("ExitCode", int)
# pipx shell exit codes
Expand Down
7 changes: 6 additions & 1 deletion src/pipx/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from pipx.util import PipxError, mkdir, pipx_wrap, rmdir
from pipx.venv import VenvContainer
from pipx.version import __version__
from src.pipx.constants import MINIMUM_PYTHON_VERSION

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -347,6 +348,7 @@ def _add_install(subparsers: argparse._SubParsersAction) -> None:
help=(
"Python to install with. Possible values can be the executable name (python3.11), "
"the version to pass to py launcher (3.11), or the full path to the executable."
f"Requires Python {MINIMUM_PYTHON_VERSION} or above."
),
)
add_pip_venv_args(p)
Expand Down Expand Up @@ -490,6 +492,7 @@ def _add_reinstall(subparsers, venv_completer: VenvCompleter) -> None:
help=(
"Python to reinstall with. Possible values can be the executable name (python3.11), "
"the version to pass to py launcher (3.11), or the full path to the executable."
f"Requires Python {MINIMUM_PYTHON_VERSION} or above."
),
)
p.add_argument("--verbose", action="store_true")
Expand Down Expand Up @@ -518,6 +521,7 @@ def _add_reinstall_all(subparsers: argparse._SubParsersAction) -> None:
help=(
"Python to reinstall with. Possible values can be the executable name (python3.11), "
"the version to pass to py launcher (3.11), or the full path to the executable."
f"Requires Python {MINIMUM_PYTHON_VERSION} or above."
),
)
p.add_argument("--skip", nargs="+", default=[], help="skip these packages")
Expand Down Expand Up @@ -594,7 +598,8 @@ def _add_run(subparsers: argparse._SubParsersAction) -> None:
default=DEFAULT_PYTHON,
help=(
"Python to run with. Possible values can be the executable name (python3.11), "
"the version to pass to py launcher (3.11), or the full path to the executable."
"the version to pass to py launcher (3.11), or the full path to the executable. "
f"Requires Python {MINIMUM_PYTHON_VERSION} or above."
),
)
add_pip_venv_args(p)
Expand Down

0 comments on commit 00f12fe

Please sign in to comment.