comparison env/lib/python3.7/site-packages/pip/__main__.py @ 5:9b1c78e6ba9c draft default tip

"planemo upload commit 6c0a8142489327ece472c84e558c47da711a9142"
author shellac
date Mon, 01 Jun 2020 08:59:25 -0400
parents 79f47841a781
children
comparison
equal deleted inserted replaced
4:79f47841a781 5:9b1c78e6ba9c
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())