2014-08-31 01:52:28 +02:00
|
|
|
from __future__ import absolute_import
|
|
|
|
|
2015-02-11 16:23:57 +01:00
|
|
|
import os
|
2014-02-10 21:28:02 +01:00
|
|
|
import sys
|
2014-02-17 19:40:39 +01:00
|
|
|
|
|
|
|
# If we are running from a wheel, add the wheel to sys.path
|
|
|
|
# This allows the usage python pip-*.whl/pip install pip-*.whl
|
|
|
|
if __package__ == '':
|
2014-02-19 10:33:51 +01:00
|
|
|
# __file__ is pip-*.whl/pip/__main__.py
|
|
|
|
# first dirname call strips of '/__main__.py', second strips off '/pip'
|
|
|
|
# Resulting path is the name of the wheel itself
|
|
|
|
# Add that to sys.path so we can import pip
|
2014-02-17 19:40:39 +01:00
|
|
|
path = os.path.dirname(os.path.dirname(__file__))
|
|
|
|
sys.path.insert(0, path)
|
|
|
|
|
2015-02-11 16:23:57 +01:00
|
|
|
import pip # noqa
|
2014-02-10 21:28:02 +01:00
|
|
|
|
2014-02-10 21:36:55 +01:00
|
|
|
if __name__ == '__main__':
|
|
|
|
sys.exit(pip.main())
|