Mercurial > repos > guerler > hhblits
comparison lib/python3.8/site-packages/pip/_internal/utils/entrypoints.py @ 0:9e54283cc701 draft
"planemo upload commit d12c32a45bcd441307e632fca6d9af7d60289d44"
author | guerler |
---|---|
date | Mon, 27 Jul 2020 03:47:31 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:9e54283cc701 |
---|---|
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) |