From ec5612e9d4c2026541874c6a3eaf7c9009ce4a31 Mon Sep 17 00:00:00 2001 Message-Id: From: Xinglu Chen Date: Wed, 14 Apr 2021 14:37:01 +0200 Subject: [PATCH] import: pypi: Use package name from the shell to construct the URI. Some packages will list an incorrect package name in the JSON object, resulting in PyPi URIs that lead to nowhere. * guix/import/pypi.scm (pypi->guix-package): Use the package name specified in the shell (guix import pypi PACKAGE-NAME) to construct the PyPi URI. Fixes . Reported by Ricardo Wurmus . --- guix/import/pypi.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index bf4dc50138..be9470ad26 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2020 Lars-Dominik Braun ;;; Copyright © 2020 Arun Isaac ;;; Copyright © 2020 Martin Becze +;;; Copyright © 2021 Xinglu Chen ;;; ;;; This file is part of GNU Guix. ;;; @@ -483,7 +484,7 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE." (leave (G_ "no source release for pypi package ~a ~a~%") (project-info-name info) (project-info-version info))))) - (make-pypi-sexp (project-info-name info) + (make-pypi-sexp package-name (project-info-version info) (and=> (latest-source-release project) distribution-url) base-commit: 82543e9649da2da9a5285ede4ec4f718fd740fcb -- 2.31.1