Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hhhrrrttt222111
GitHub Repository: hhhrrrttt222111/Dorkify
Path: blob/master/venv/Lib/site-packages/pip/_internal/utils/entrypoints.py
811 views
1
import sys
2
3
from pip._internal.cli.main import main
4
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
5
6
if MYPY_CHECK_RUNNING:
7
from typing import Optional, List
8
9
10
def _wrapper(args=None):
11
# type: (Optional[List[str]]) -> int
12
"""Central wrapper for all old entrypoints.
13
14
Historically pip has had several entrypoints defined. Because of issues
15
arising from PATH, sys.path, multiple Pythons, their interactions, and most
16
of them having a pip installed, users suffer every time an entrypoint gets
17
moved.
18
19
To alleviate this pain, and provide a mechanism for warning users and
20
directing them to an appropriate place for help, we now define all of
21
our old entrypoints as wrappers for the current one.
22
"""
23
sys.stderr.write(
24
"WARNING: pip is being invoked by an old script wrapper. This will "
25
"fail in a future version of pip.\n"
26
"Please see https://github.com/pypa/pip/issues/5599 for advice on "
27
"fixing the underlying issue.\n"
28
"To avoid this problem you can invoke Python with '-m pip' instead of "
29
"running pip directly.\n"
30
)
31
return main(args)
32
33