From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id IMlGJeDHmV+MMQAA0tVLHw (envelope-from ) for ; Wed, 28 Oct 2020 19:34:56 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 8JgUIeDHmV/oOAAAbx9fmQ (envelope-from ) for ; Wed, 28 Oct 2020 19:34:56 +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 30F879403CA for ; Wed, 28 Oct 2020 19:34:56 +0000 (UTC) Received: from localhost ([::1]:54482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXrDi-0006PW-Vc for larch@yhetil.org; Wed, 28 Oct 2020 15:34:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXrBu-0004e9-F4 for bug-guix@gnu.org; Wed, 28 Oct 2020 15:33:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39248) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kXrBt-0001eA-MI for bug-guix@gnu.org; Wed, 28 Oct 2020 15:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kXrBt-0007Ak-IX for bug-guix@gnu.org; Wed, 28 Oct 2020 15:33:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#44030: [PATCH] import: pypi: Add '@' syntax for specifying the package version. References: <86wnzqz3h8.fsf@gmail.com> In-Reply-To: <86wnzqz3h8.fsf@gmail.com> Resent-From: Lulu Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 28 Oct 2020 19:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44030 X-GNU-PR-Package: guix X-GNU-PR-Keywords: easy To: "guix-patches@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.160391356427545 (code B ref -1); Wed, 28 Oct 2020 19:33:01 +0000 Received: (at submit) by debbugs.gnu.org; 28 Oct 2020 19:32:44 +0000 Received: from localhost ([127.0.0.1]:50792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXrBc-0007AD-G5 for submit@debbugs.gnu.org; Wed, 28 Oct 2020 15:32:44 -0400 Received: from lists.gnu.org ([209.51.188.17]:38238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXrBa-0007A4-38 for submit@debbugs.gnu.org; Wed, 28 Oct 2020 15:32:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXrBZ-0004Ka-33 for guix-patches@gnu.org; Wed, 28 Oct 2020 15:32:41 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]:48488) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1kXrBV-0001bJ-AJ for guix-patches@gnu.org; Wed, 28 Oct 2020 15:32:40 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4CLzHN0mHKzQlQv for ; Wed, 28 Oct 2020 20:32:32 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id gJM05kggzE8O for ; Wed, 28 Oct 2020 20:32:28 +0100 (CET) Date: Wed, 28 Oct 2020 22:32:27 +0300 (TRT) From: Lulu Message-ID: <1052540792.123562.1603913548037@office.mailbox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Normal X-MBO-SPAM-Probability: X-Rspamd-Score: -6.19 / 15.00 / 15.00 X-Rspamd-Queue-Id: BD98517E8 X-Rspamd-UID: 746a65 Received-SPF: pass client-ip=80.241.56.172; envelope-from=me@erkin.party; helo=mout-p-202.mailbox.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/28 15:32:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.6 (--) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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-Spam-Score: -1.01 X-TUID: sOGDfqjbo/ho * guix/import/pypi.scm (pypi-fetch): Add =E2=80=99@=E2=80=99 syntax for spe= cifying the package version. --- guix/import/pypi.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index 15116e349d..559be4a98b 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -118,8 +118,10 @@ =20 (define (pypi-fetch name) "Return a record for package NAME, or #f on failure." - (and=3D> (json-fetch (string-append "https://pypi.org/pypi/" name "/j= son")) - json->pypi-project)) + ;; Convert @ in package name to / to access the correct URL. + (let ((versioned-name (string-join (string-split name #\@) "/"))) + (and=3D> (json-fetch (string-append "https://pypi.org/pypi/" versi= oned-name "/json")) + json->pypi-project))) =20 ;; For packages found on PyPI that lack a source distribution. (define-condition-type &missing-source-error &error --=20 2.29.1