Skip to content

Commit

Permalink
Fix commands.install.site_packages_writable signature
Browse files Browse the repository at this point in the history
  • Loading branch information
McSinyx committed Jul 18, 2020
1 parent 70e2445 commit ad17477
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/pip/_internal/commands/install.py
Expand Up @@ -535,24 +535,28 @@ def _warn_about_conflicts(self, conflict_details):


def get_lib_location_guesses(
user=False, # type: bool
home=None, # type: Optional[str]
root=None, # type: Optional[str]
isolated=False, # type: bool
prefix=None # type: Optional[str]
user=False, # type: bool
home=None, # type: Optional[str]
root=None, # type: Optional[str]
isolated=False, # type: bool
prefix=None, # type: Optional[str]
):
# type:(...) -> List[str]
# type: (...) -> List[str]
scheme = distutils_scheme('', user=user, home=home, root=root,
isolated=isolated, prefix=prefix)
return [scheme['purelib'], scheme['platlib']]


def site_packages_writable(root, isolated):
# type: (Optional[str], bool) -> bool
return all(
test_writable_dir(d) for d in set(
get_lib_location_guesses(root=root, isolated=isolated))
)
def site_packages_writable(
user=False, # type: bool
root=None, # type: Optional[str]
isolated=False, # type: bool
prefix=None, # type: Optional[str]
):
# type: (...) -> bool
return all(map(test_writable_dir, set(get_lib_location_guesses(
user=user, root=root, isolated=isolated, prefix=prefix,
))))


def decide_user_install(
Expand Down

0 comments on commit ad17477

Please sign in to comment.