Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
pip._internal.req Namespace Reference

Namespaces

namespace  constructors
 
namespace  req_file
 
namespace  req_install
 
namespace  req_set
 
namespace  req_uninstall
 

Data Structures

class  InstallationResult
 

Functions

Generator[Tuple[str, InstallRequirement], None, None_validate_requirements (List[InstallRequirement] requirements)
 
List[InstallationResultinstall_given_reqs (List[InstallRequirement] requirements, Sequence[str] global_options, Optional[str] root, Optional[str] home, Optional[str] prefix, bool warn_script_location, bool use_user_site, bool pycompile)
 

Variables

 logger = logging.getLogger(__name__)
 

Function Documentation

◆ _validate_requirements()

Generator[Tuple[str, InstallRequirement], None, None] _validate_requirements ( List[InstallRequirement requirements)
protected

Definition at line 29 of file __init__.py.

31) -> Generator[Tuple[str, InstallRequirement], None, None]:
32 for req in requirements:
33 assert req.name, f"invalid to-be-installed requirement: {req}"
34 yield req.name, req
35
36
for i

References i.

Referenced by pip._internal.req.install_given_reqs().

Here is the caller graph for this function:

◆ install_given_reqs()

List[InstallationResult] install_given_reqs ( List[InstallRequirement requirements,
Sequence[str]  global_options,
Optional[str]  root,
Optional[str]  home,
Optional[str]  prefix,
bool  warn_script_location,
bool  use_user_site,
bool  pycompile 
)
Install everything in the given list.

(to be called after having downloaded and unpacked the packages)

Definition at line 37 of file __init__.py.

46) -> List[InstallationResult]:
47 """
48 Install everything in the given list.
49
50 (to be called after having downloaded and unpacked the packages)
51 """
52 to_install = collections.OrderedDict(_validate_requirements(requirements))
53
54 if to_install:
56 "Installing collected packages: %s",
57 ", ".join(to_install.keys()),
58 )
59
60 installed = []
61
62 with indent_log():
63 for req_name, requirement in to_install.items():
65 logger.info("Attempting uninstall: %s", req_name)
66 with indent_log():
67 uninstalled_pathset = requirement.uninstall(auto_confirm=True)
68 else:
69 uninstalled_pathset = None
70
71 try:
73 global_options,
74 root=root,
75 home=home,
76 prefix=prefix,
77 warn_script_location=warn_script_location,
78 use_user_site=use_user_site,
79 pycompile=pycompile,
80 )
81 except Exception:
82 # if install did not succeed, rollback previous uninstall
83 if uninstalled_pathset and not requirement.install_succeeded:
85 raise
86 else:
87 if uninstalled_pathset and requirement.install_succeeded:
89
90 installed.append(InstallationResult(req_name))
91
92 return installed

References pip._internal.req._validate_requirements(), and i.

Here is the call graph for this function:

Variable Documentation

◆ logger

logger = logging.getLogger(__name__)

Definition at line 18 of file __init__.py.