handlers/pypi: stop using mirrors
Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
parent
5da26b0719
commit
a7ff66ae04
@ -17,11 +17,11 @@ PRIORITY = 90
|
|||||||
|
|
||||||
|
|
||||||
def can_handle(pkg, url=None):
|
def can_handle(pkg, url=None):
|
||||||
return url and url.startswith("mirror://pypi/")
|
return url and url.startswith("https://files.pythonhosted.org/packages/source/p/")
|
||||||
|
|
||||||
|
|
||||||
def guess_package(cp, url):
|
def guess_package(cp, url):
|
||||||
match = re.search(r"mirror://pypi/\w+/(.*)/.*", url)
|
match = re.search(r"https://files.pythonhosted.org/packages/source/p/(.*)/.*", url)
|
||||||
if match:
|
if match:
|
||||||
return match.group(1)
|
return match.group(1)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user