From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YP1ZAjjkdmBcvwAAgWs5BA (envelope-from ) for ; Wed, 14 Apr 2021 14:46:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id CKEFODfkdmBqPAAA1q6Kng (envelope-from ) for ; Wed, 14 Apr 2021 12:46:47 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 12B1126634 for ; Wed, 14 Apr 2021 14:46:47 +0200 (CEST) Received: from localhost ([::1]:52836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWeur-0003mn-V8 for larch@yhetil.org; Wed, 14 Apr 2021 08:46:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWeuA-0003jB-ST for bug-guix@gnu.org; Wed, 14 Apr 2021 08:46:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50573) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lWeuA-0003rA-JF for bug-guix@gnu.org; Wed, 14 Apr 2021 08:46:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lWeuA-0006kE-Fb for bug-guix@gnu.org; Wed, 14 Apr 2021 08:46:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#47746: pypi importer generates wrong pypi-uri without underscore Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 14 Apr 2021 12:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47746 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ricardo Wurmus Received: via spool by 47746-submit@debbugs.gnu.org id=B47746.161840433525876 (code B ref 47746); Wed, 14 Apr 2021 12:46:02 +0000 Received: (at 47746) by debbugs.gnu.org; 14 Apr 2021 12:45:35 +0000 Received: from localhost ([127.0.0.1]:33886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWetd-0006j4-W7 for submit@debbugs.gnu.org; Wed, 14 Apr 2021 08:45:35 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:47104 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWetY-0006iY-Nm for 47746@debbugs.gnu.org; Wed, 14 Apr 2021 08:45:28 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1618404314; bh=JeDp4TlTqa9c5mvjB1pYiDnHVJ5DCKNAQ0YxqpgzCcE=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=QvYL2N6g2iZZ9/F3zcSIfoMc/qZUmq2kS/kNIxDTg15PZzSjGosT8njrtMkmQJcBb akz8T3Snr+5BNAYYQ4WJonHTxPa26dIPnP1CzwrsL9IH7cubI6Nl7/5H0UFtiKif3e CN23uEh40DJ5ipeDB6lRH3xoiWdpyTSPYMC8EM70= In-Reply-To: <87h7k9uanf.fsf@elephly.net> References: <87pmyytx8d.fsf@elephly.net> <87y2dmf20v.fsf@yoctocell.xyz> <87h7k9uanf.fsf@elephly.net> Date: Wed, 14 Apr 2021 14:45:11 +0200 Message-ID: <871rbdhw6g.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 47746@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618404407; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=kVeu5NtikewZpScSlXeCLf/YEU/iIJ6I0H82pEv+H4I=; b=Kh6pF8Or0/gYrA/4w5+pyRQMmrc4uiisksozyZYNT7Pj0WF0GsVPREV8dE62cBE3URpo0D YAxpkTIoelOnnai86gDdqItak1oWJDgYT1jnKSpvB5LtfhvFb2bvyGsCECCupW3AscYKfO ikWTYIAliMDa1pG0NRKbEWio84Gj+knnixHV1MnEnFwhrnl2aubxG+j1ASL7MTjade0O1S s7E2NuYJt0EDO9w9VFYL4KV3//6t5Y2Snuku10DF8+WKhQgvyI32JntCmNmv1jIPRNqnEl G8j+P614c/ULVZUd+NmDEvNTusafOQZlOK8DRWaf5orZk7wtO1UmXzJZ08e9CA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618404407; a=rsa-sha256; cv=none; b=jSwLX30T1QgMZoI4qWjG522aLKW2sDD9Csf4d1mF8+OsZdZ1FJc0fsFb6ILdLldi6e71XI 42aDi7w7vNUdh4MsUDqOmrgU0yhqBEMYly7mCfCAmNEicqlshxDc7/XaBLXl12ZSfPuFPA fGmJa//L2QG+T1Uaw9UMuiLpc08/MW9Th2yjASXC5FtPPLSrrP4OWZXywMebE5w1RcUvvg eV9ZHVfWKkeQzixfyO99DLJ0o5SSPQHQLCCBKR883+pcpAWUwQUct7VX7mLzWp6I8mt20n x2Kekjlfovvn3pNCGk8n+gXWzjFd68ToTb3hMmzEIb6RLHpqfFqh1NzatwN88A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=QvYL2N6g; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -1.34 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=QvYL2N6g; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 12B1126634 X-Spam-Score: -1.34 X-Migadu-Scanner: scn0.migadu.com X-TUID: VQfkaz1REd5O --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Apr 13 2021, Ricardo Wurmus wrote: > You=E2=80=99re right, this only affects some packages. Here are two=20 > examples: > > [...] > > They both have a redirection in common, but the pypi-uri is=20 > incorrect as it needs to have the underscore. Looking at the JSON object at , it specifies =E2=80=9Cjupyterlabs-widgets=E2=80=9D as =E2=80=98info.downloads.name=E2=80= =99, which is what the PyPi importer reads to determine the PyPi URI. Would it make sense to just make it read the name that the user specifies in the shell, i.e. =E2=80=98./pre-inst-env guix import pypi PACKAGE-NAME=E2=80=99 (see the patch below)? Or will this potentially mess= up other PyPi URIs? --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-import-pypi-Use-package-name-from-the-shell-to-const.patch Content-Transfer-Encoding: quoted-printable Content-Description: fix-pypi-uri >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 =C2=A9 2020 Lars-Dominik Braun ;;; Copyright =C2=A9 2020 Arun Isaac ;;; Copyright =C2=A9 2020 Martin Becze +;;; Copyright =C2=A9 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=3D> (latest-source-release project) distribution-url) base-commit: 82543e9649da2da9a5285ede4ec4f718fd740fcb --=20 2.31.1 --=-=-=--