Skip to content

Commit ddd41e3

Browse files
chryslewebknjaz
andauthored
Simplify test for pip and set minimum version
Co-authored-by: Sviatoslav Sydorenko <[email protected]>
1 parent 51a010b commit ddd41e3

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

src/pipx/commands/install.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@ def install(
5959

6060
try:
6161
# Enable installing shared library `pip` with `pipx`
62-
override_shared = False
63-
64-
if package_name == "pip":
65-
override_shared = True
62+
override_shared = package_name == "pip"
6663
venv.create_venv(venv_args, pip_args, override_shared)
6764
for dep in preinstall_packages or []:
6865
dep_name = package_name_from_spec(

src/pipx/commands/run.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,7 @@ def _download_and_run(
226226
package_or_url, python, pip_args=pip_args, verbose=verbose
227227
)
228228

229-
override_shared = False
230-
231-
if package_name == "pip":
232-
override_shared = True
229+
override_shared = package_name == "pip"
233230

234231
venv.create_venv(venv_args, pip_args, override_shared)
235232
venv.install_package(

src/pipx/shared_libs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def upgrade(
106106
"install",
107107
*_pip_args,
108108
"--upgrade",
109-
"pip",
109+
"pip >= 23.1",
110110
]
111111
)
112112
subprocess_post_check(upgrade_process)

0 commit comments

Comments
 (0)