Path: blob/master/venv/Lib/site-packages/pip/__main__.py
811 views
from __future__ import absolute_import12import os3import sys45# Remove '' and current working directory from the first entry6# of sys.path, if present to avoid using current directory7# in pip commands check, freeze, install, list and show,8# when invoked as python -m pip <command>9if sys.path[0] in ('', os.getcwd()):10sys.path.pop(0)1112# If we are running from a wheel, add the wheel to sys.path13# This allows the usage python pip-*.whl/pip install pip-*.whl14if __package__ == '':15# __file__ is pip-*.whl/pip/__main__.py16# first dirname call strips of '/__main__.py', second strips off '/pip'17# Resulting path is the name of the wheel itself18# Add that to sys.path so we can import pip19path = os.path.dirname(os.path.dirname(__file__))20sys.path.insert(0, path)2122from pip._internal.cli.main import main as _main # isort:skip # noqa2324if __name__ == '__main__':25sys.exit(_main())262728