Skip to content

Commit

Permalink
Simplify test for pip and set minimum version
Browse files Browse the repository at this point in the history
Co-authored-by: Sviatoslav Sydorenko <[email protected]>
  • Loading branch information
chrysle and webknjaz authored Dec 1, 2023
1 parent 51a010b commit ddd41e3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
5 changes: 1 addition & 4 deletions src/pipx/commands/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ def install(

try:
# Enable installing shared library `pip` with `pipx`
override_shared = False

if package_name == "pip":
override_shared = True
override_shared = package_name == "pip"
venv.create_venv(venv_args, pip_args, override_shared)
for dep in preinstall_packages or []:
dep_name = package_name_from_spec(
Expand Down
5 changes: 1 addition & 4 deletions src/pipx/commands/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,7 @@ def _download_and_run(
package_or_url, python, pip_args=pip_args, verbose=verbose
)

override_shared = False

if package_name == "pip":
override_shared = True
override_shared = package_name == "pip"

venv.create_venv(venv_args, pip_args, override_shared)
venv.install_package(
Expand Down
2 changes: 1 addition & 1 deletion src/pipx/shared_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def upgrade(
"install",
*_pip_args,
"--upgrade",
"pip",
"pip >= 23.1",
]
)
subprocess_post_check(upgrade_process)
Expand Down

0 comments on commit ddd41e3

Please sign in to comment.