Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hhhrrrttt222111
GitHub Repository: hhhrrrttt222111/Dorkify
Path: blob/master/venv/Lib/site-packages/pip/__main__.py
811 views
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())
27
28