Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
news
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sartika Aritonang
news
Commits
1c24d64d
Commit
1c24d64d
authored
May 29, 2020
by
Sartika Aritonang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
8359eceb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
index.py
stbi/Lib/site-packages/pip/_internal/models/index.py
+31
-0
No files found.
stbi/Lib/site-packages/pip/_internal/models/index.py
0 → 100644
View file @
1c24d64d
from
pip._vendor.six.moves.urllib
import
parse
as
urllib_parse
class
PackageIndex
(
object
):
"""Represents a Package Index and provides easier access to endpoints
"""
def
__init__
(
self
,
url
,
file_storage_domain
):
# type: (str, str) -> None
super
(
PackageIndex
,
self
)
.
__init__
()
self
.
url
=
url
self
.
netloc
=
urllib_parse
.
urlsplit
(
url
)
.
netloc
self
.
simple_url
=
self
.
_url_for_path
(
'simple'
)
self
.
pypi_url
=
self
.
_url_for_path
(
'pypi'
)
# This is part of a temporary hack used to block installs of PyPI
# packages which depend on external urls only necessary until PyPI can
# block such packages themselves
self
.
file_storage_domain
=
file_storage_domain
def
_url_for_path
(
self
,
path
):
# type: (str) -> str
return
urllib_parse
.
urljoin
(
self
.
url
,
path
)
PyPI
=
PackageIndex
(
'https://pypi.org/'
,
file_storage_domain
=
'files.pythonhosted.org'
)
TestPyPI
=
PackageIndex
(
'https://test.pypi.org/'
,
file_storage_domain
=
'test-files.pythonhosted.org'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment