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

View file

@ -437,7 +437,8 @@ (define (pypi-package? package)
(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)))