diff options
author | Shubham Saini <shubham6405@gmail.com> | 2018-12-11 10:01:23 +0000 |
---|---|---|
committer | Shubham Saini <shubham6405@gmail.com> | 2018-12-11 10:01:23 +0000 |
commit | 68df54d6629ec019142eb149dd037774f2d11e7c (patch) | |
tree | 345bc22d46b4e01a4ba8303b94278952a4ed2b9e /venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/models |
First commit
Diffstat (limited to 'venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/models')
-rw-r--r-- | venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/models/__init__.py | 4 | ||||
-rw-r--r-- | venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/models/index.py | 15 |
2 files changed, 19 insertions, 0 deletions
diff --git a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/models/__init__.py b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/models/__init__.py new file mode 100644 index 0000000..2d080a4 --- /dev/null +++ b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/models/__init__.py | |||
@@ -0,0 +1,4 @@ | |||
1 | from pip._internal.models.index import Index, PyPI | ||
2 | |||
3 | |||
4 | __all__ = ["Index", "PyPI"] | ||
diff --git a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/models/index.py b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/models/index.py new file mode 100644 index 0000000..161de50 --- /dev/null +++ b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/models/index.py | |||
@@ -0,0 +1,15 @@ | |||
1 | from pip._vendor.six.moves.urllib import parse as urllib_parse | ||
2 | |||
3 | |||
4 | class Index(object): | ||
5 | def __init__(self, url): | ||
6 | self.url = url | ||
7 | self.netloc = urllib_parse.urlsplit(url).netloc | ||
8 | self.simple_url = self.url_to_path('simple') | ||
9 | self.pypi_url = self.url_to_path('pypi') | ||
10 | |||
11 | def url_to_path(self, path): | ||
12 | return urllib_parse.urljoin(self.url, path) | ||
13 | |||
14 | |||
15 | PyPI = Index('https://pypi.org/') | ||