Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
news
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sartika Aritonang
news
Commits
a0c913e2
Commit
a0c913e2
authored
May 29, 2020
by
Sartika Aritonang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
d62e4458
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
0 deletions
+51
-0
check.py
stbi/Lib/site-packages/pip/_internal/commands/check.py
+51
-0
No files found.
stbi/Lib/site-packages/pip/_internal/commands/check.py
0 → 100644
View file @
a0c913e2
import
logging
from
pip._internal.cli.base_command
import
Command
from
pip._internal.cli.status_codes
import
ERROR
,
SUCCESS
from
pip._internal.operations.check
import
(
check_package_set
,
create_package_set_from_installed
,
)
from
pip._internal.utils.misc
import
write_output
from
pip._internal.utils.typing
import
MYPY_CHECK_RUNNING
logger
=
logging
.
getLogger
(
__name__
)
if
MYPY_CHECK_RUNNING
:
from
typing
import
List
,
Any
from
optparse
import
Values
class
CheckCommand
(
Command
):
"""Verify installed packages have compatible dependencies."""
usage
=
"""
%
prog [options]"""
def
run
(
self
,
options
,
args
):
# type: (Values, List[Any]) -> int
package_set
,
parsing_probs
=
create_package_set_from_installed
()
missing
,
conflicting
=
check_package_set
(
package_set
)
for
project_name
in
missing
:
version
=
package_set
[
project_name
]
.
version
for
dependency
in
missing
[
project_name
]:
write_output
(
"
%
s
%
s requires
%
s, which is not installed."
,
project_name
,
version
,
dependency
[
0
],
)
for
project_name
in
conflicting
:
version
=
package_set
[
project_name
]
.
version
for
dep_name
,
dep_version
,
req
in
conflicting
[
project_name
]:
write_output
(
"
%
s
%
s has requirement
%
s, but you have
%
s
%
s."
,
project_name
,
version
,
req
,
dep_name
,
dep_version
,
)
if
missing
or
conflicting
or
parsing_probs
:
return
ERROR
else
:
write_output
(
"No broken requirements found."
)
return
SUCCESS
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment