Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
check.py
Go to the documentation of this file.
1import logging
2from optparse import Values
3from typing import List
4
5from pip._internal.cli.base_command import Command
6from pip._internal.cli.status_codes import ERROR, SUCCESS
8 check_package_set,
9 create_package_set_from_installed,
10 warn_legacy_versions_and_specifiers,
11)
12from pip._internal.utils.misc import write_output
13
14logger = logging.getLogger(__name__)
15
16
18 """Verify installed packages have compatible dependencies."""
19
20 usage = """
21 %prog [options]"""
22
23 def run(self, options: Values, args: List[str]) -> int:
24 package_set, parsing_probs = create_package_set_from_installed()
25 warn_legacy_versions_and_specifiers(package_set)
26 missing, conflicting = check_package_set(package_set)
27
28 for project_name in missing:
29 version = package_set[project_name].version
30 for dependency in missing[project_name]:
31 write_output(
32 "%s %s requires %s, which is not installed.",
33 project_name,
34 version,
35 dependency[0],
36 )
37
38 for project_name in conflicting:
39 version = package_set[project_name].version
40 for dep_name, dep_version, req in conflicting[project_name]:
41 write_output(
42 "%s %s has requirement %s, but you have %s %s.",
43 project_name,
44 version,
45 req,
46 dep_name,
47 dep_version,
48 )
49
50 if missing or conflicting or parsing_probs:
51 return ERROR
52 else:
53 write_output("No broken requirements found.")
54 return SUCCESS
int run(self, Values options, List[str] args)
Definition check.py:23
for i