gnu: Use pypi.org.

<pypi.io> redirects to <pypi.org>.

* guix/build-system/python.scm (pypi-uri): Replace pypi.io with pypi.org.
* guix/import/pypi.scm (pypi-url?): Likewise.
* tests/pypi.scm: Likewise.
This commit is contained in:
Leo Famulari 2018-10-12 23:47:15 -04:00
parent eed00f93e8
commit 7277d06d8b
No known key found for this signature in database
GPG Key ID: 2646FA30BACA7F08
3 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@
"Return a URI string for the Python package hosted on the Python Package "Return a URI string for the Python package hosted on the Python Package
Index (PyPI) corresponding to NAME and VERSION. EXTENSION is the file name Index (PyPI) corresponding to NAME and VERSION. EXTENSION is the file name
extension, such as '.tar.gz'." extension, such as '.tar.gz'."
(string-append "https://pypi.io/packages/source/" (string-append "https://pypi.org/packages/source/"
(string-take name 1) "/" name "/" (string-take name 1) "/" name "/"
name "-" version extension)) name "-" version extension))

View File

@ -330,7 +330,7 @@ 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.io/packages" url))) (string-prefix? "https://pypi.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)))

View File

@ -81,7 +81,7 @@ baz > 13.37")
(dummy-package "foo" (dummy-package "foo"
(source (dummy-origin (source (dummy-origin
(uri (uri
"https://pypi.io/packages/source/p/psutil/psutil-4.3.0.tar.gz")))))) "https://pypi.org/packages/source/p/psutil/psutil-4.3.0.tar.gz"))))))
(test-equal "guix-package->pypi-name, new URL style" (test-equal "guix-package->pypi-name, new URL style"
"certbot" "certbot"