Mercurial > repos > shellac > guppy_basecaller
comparison env/lib/python3.7/site-packages/pip/__main__.py @ 0:26e78fe6e8c4 draft
"planemo upload commit c699937486c35866861690329de38ec1a5d9f783"
| author | shellac |
|---|---|
| date | Sat, 02 May 2020 07:14:21 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:26e78fe6e8c4 |
|---|---|
| 1 from __future__ import absolute_import | |
| 2 | |
| 3 import os | |
| 4 import sys | |
| 5 | |
| 6 # Remove '' and current working directory from the first entry | |
| 7 # of sys.path, if present to avoid using current directory | |
| 8 # in pip commands check, freeze, install, list and show, | |
| 9 # when invoked as python -m pip <command> | |
| 10 if sys.path[0] in ('', os.getcwd()): | |
| 11 sys.path.pop(0) | |
| 12 | |
| 13 # If we are running from a wheel, add the wheel to sys.path | |
| 14 # This allows the usage python pip-*.whl/pip install pip-*.whl | |
| 15 if __package__ == '': | |
| 16 # __file__ is pip-*.whl/pip/__main__.py | |
| 17 # first dirname call strips of '/__main__.py', second strips off '/pip' | |
| 18 # Resulting path is the name of the wheel itself | |
| 19 # Add that to sys.path so we can import pip | |
| 20 path = os.path.dirname(os.path.dirname(__file__)) | |
| 21 sys.path.insert(0, path) | |
| 22 | |
| 23 from pip._internal.cli.main import main as _main # isort:skip # noqa | |
| 24 | |
| 25 if __name__ == '__main__': | |
| 26 sys.exit(_main()) |
