handlers/pypi: stop using mirrors

Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
Alfred Wingate 2024-03-03 20:12:32 +02:00
parent 5da26b0719
commit a7ff66ae04
No known key found for this signature in database
GPG Key ID: A12750536B5E7010
1 changed files with 2 additions and 2 deletions

View File

@ -17,11 +17,11 @@ PRIORITY = 90
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):
match = re.search(r"mirror://pypi/\w+/(.*)/.*", url)
match = re.search(r"https://files.pythonhosted.org/packages/source/p/(.*)/.*", url)
if match:
return match.group(1)