1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Pass explicit arguments to install_given_req.

This commit is contained in:
Stéphane Bidoul 2020-05-21 14:15:10 +02:00
parent 3ec6b824dd
commit 5cc4f2e390
No known key found for this signature in database
GPG key ID: BCAB2555446B5B92
2 changed files with 15 additions and 7 deletions

View file

@ -399,9 +399,9 @@ class InstallCommand(RequirementCommand):
root=options.root_path, root=options.root_path,
home=target_temp_dir_path, home=target_temp_dir_path,
prefix=options.prefix_path, prefix=options.prefix_path,
pycompile=options.compile,
warn_script_location=warn_script_location, warn_script_location=warn_script_location,
use_user_site=options.use_user_site, use_user_site=options.use_user_site,
pycompile=options.compile,
) )
lib_locations = get_lib_location_guesses( lib_locations = get_lib_location_guesses(

View file

@ -13,7 +13,7 @@ from .req_install import InstallRequirement
from .req_set import RequirementSet from .req_set import RequirementSet
if MYPY_CHECK_RUNNING: if MYPY_CHECK_RUNNING:
from typing import Any, List, Sequence from typing import List, Optional, Sequence
__all__ = [ __all__ = [
"RequirementSet", "InstallRequirement", "RequirementSet", "InstallRequirement",
@ -36,9 +36,13 @@ class InstallationResult(object):
def install_given_reqs( def install_given_reqs(
to_install, # type: List[InstallRequirement] to_install, # type: List[InstallRequirement]
install_options, # type: List[str] install_options, # type: List[str]
global_options=(), # type: Sequence[str] global_options, # type: Sequence[str]
*args, # type: Any root, # type: Optional[str]
**kwargs # type: Any home, # type: Optional[str]
prefix, # type: Optional[str]
warn_script_location, # type: bool
use_user_site, # type: bool
pycompile, # type: bool
): ):
# type: (...) -> List[InstallationResult] # type: (...) -> List[InstallationResult]
""" """
@ -67,8 +71,12 @@ def install_given_reqs(
requirement.install( requirement.install(
install_options, install_options,
global_options, global_options,
*args, root=root,
**kwargs home=home,
prefix=prefix,
warn_script_location=warn_script_location,
use_user_site=use_user_site,
pycompile=pycompile,
) )
except Exception: except Exception:
should_rollback = ( should_rollback = (