import: pypi: Refresher recognizes pythonhosted.org source URLs.

This is a followup to a537620054.
Since that commit, 'pypi-package?' would return false for most Python
packages, and thus "guix refresh python-xxx" would report that no
updaters apply to the package.

* guix/import/pypi.scm (pypi-package?)[pypi-url?]: Recognize
"files.pythonhosted.org" URLs.
This commit is contained in:
Ludovic Courtès 2019-09-18 22:53:17 +02:00
parent d0980ef418
commit 45fbc15a48
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 2 additions and 1 deletions

View File

@ -437,7 +437,8 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE."
(define (pypi-url? url) (define (pypi-url? url)
(or (string-prefix? "https://pypi.org/" url) (or (string-prefix? "https://pypi.org/" url)
(string-prefix? "https://pypi.python.org/" url) (string-prefix? "https://pypi.python.org/" url)
(string-prefix? "https://pypi.org/packages" url))) (string-prefix? "https://pypi.org/packages" url)
(string-prefix? "https://files.pythonhosted.org/packages" url)))
(let ((source-url (and=> (package-source package) origin-uri)) (let ((source-url (and=> (package-source package) origin-uri))
(fetch-method (and=> (package-source package) origin-method))) (fetch-method (and=> (package-source package) origin-method)))