Mercurial > repos > shellac > guppy_basecaller
comparison env/lib/python3.7/site-packages/pip/__main__.py @ 2:6af9afd405e9 draft
"planemo upload commit 0a63dd5f4d38a1f6944587f52a8cd79874177fc1"
author | shellac |
---|---|
date | Thu, 14 May 2020 14:56:58 -0400 |
parents | 26e78fe6e8c4 |
children |
comparison
equal
deleted
inserted
replaced
1:75ca89e9b81c | 2:6af9afd405e9 |
---|---|
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()) |