Path: blob/master/venv/Lib/site-packages/pip/_internal/utils/entrypoints.py
811 views
import sys12from pip._internal.cli.main import main3from pip._internal.utils.typing import MYPY_CHECK_RUNNING45if MYPY_CHECK_RUNNING:6from typing import Optional, List789def _wrapper(args=None):10# type: (Optional[List[str]]) -> int11"""Central wrapper for all old entrypoints.1213Historically pip has had several entrypoints defined. Because of issues14arising from PATH, sys.path, multiple Pythons, their interactions, and most15of them having a pip installed, users suffer every time an entrypoint gets16moved.1718To alleviate this pain, and provide a mechanism for warning users and19directing them to an appropriate place for help, we now define all of20our old entrypoints as wrappers for the current one.21"""22sys.stderr.write(23"WARNING: pip is being invoked by an old script wrapper. This will "24"fail in a future version of pip.\n"25"Please see https://github.com/pypa/pip/issues/5599 for advice on "26"fixing the underlying issue.\n"27"To avoid this problem you can invoke Python with '-m pip' instead of "28"running pip directly.\n"29)30return main(args)313233