From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OFFhAeyKll9NXgAA0tVLHw (envelope-from ) for ; Mon, 26 Oct 2020 08:38:04 +0000 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 wAHdOOuKll8MVQAA1q6Kng (envelope-from ) for ; Mon, 26 Oct 2020 08:38:03 +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 A02B7940366 for ; Mon, 26 Oct 2020 08:38:03 +0000 (UTC) Received: from localhost ([::1]:39062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWy0w-0006zD-JB for larch@yhetil.org; Mon, 26 Oct 2020 04:38:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWpRg-0005bR-CG for bug-guix@gnu.org; Sun, 25 Oct 2020 19:29:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54633) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kWpRg-0002xp-2T for bug-guix@gnu.org; Sun, 25 Oct 2020 19:29:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kWpRf-000255-Va for bug-guix@gnu.org; Sun, 25 Oct 2020 19:29:03 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#44030: [PATCH] guix: import: Add versioning syntax to pypi importer. Resent-From: Lulu Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 25 Oct 2020 23:29:03 +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.16036685267933 (code B ref -1); Sun, 25 Oct 2020 23:29:03 +0000 Received: (at submit) by debbugs.gnu.org; 25 Oct 2020 23:28:46 +0000 Received: from localhost ([127.0.0.1]:37939 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWpRN-00023n-OI for submit@debbugs.gnu.org; Sun, 25 Oct 2020 19:28:46 -0400 Received: from lists.gnu.org ([209.51.188.17]:41006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWmFy-0005Rw-NF for submit@debbugs.gnu.org; Sun, 25 Oct 2020 16:04:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWmFy-00046x-IY for guix-patches@gnu.org; Sun, 25 Oct 2020 16:04:46 -0400 Received: from mout-p-103.mailbox.org ([2001:67c:2050::465:103]:41248) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1kWmFv-0001NF-SF for guix-patches@gnu.org; Sun, 25 Oct 2020 16:04:45 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2: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-103.mailbox.org (Postfix) with ESMTPS id 4CK87r5RLCzQl1t for ; Sun, 25 Oct 2020 21:04:40 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter06.heinlein-hosting.de (spamfilter06.heinlein-hosting.de [80.241.56.125]) (amavisd-new, port 10030) with ESMTP id Sjhc1aI4euQA for ; Sun, 25 Oct 2020 21:04:37 +0100 (CET) Date: Sun, 25 Oct 2020 23:04:32 +0300 (TRT) From: Lulu Message-ID: <1085530218.67944.1603656272351@office.mailbox.org> In-Reply-To: <458803687.67759.1603652981842@office.mailbox.org> References: <458803687.67759.1603652981842@office.mailbox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-MBO-SPAM-Probability: X-Rspamd-Score: -6.12 / 15.00 / 15.00 X-Rspamd-Queue-Id: 7629F271 X-Rspamd-UID: da0e94 Received-SPF: pass client-ip=2001:67c:2050::465:103; envelope-from=me@erkin.party; helo=mout-p-103.mailbox.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-Mailman-Approved-At: Sun, 25 Oct 2020 19:28:42 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.7 (--) X-Mailman-Approved-At: Mon, 26 Oct 2020 04:35:21 -0400 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: v68582Ri+37y Ah, heck, I used an old revision of the file when I generated the diff. Sorry about that. Here's the properly working patch: diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index 15116e349d..1ec1ecbfa1 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -118,13 +118,15 @@ (define (pypi-fetch name) "Return a record for package NAME, or #f on failure." - (and=> (json-fetch (string-append "https://pypi.org/pypi/" name "/json")) - json->pypi-project)) + ;; Convert @ in package name to / to access the correct URL. + (let ((versioned-name (string-join (string-split name #\@) "/"))) + (and=> (json-fetch (string-append "https://pypi.org/pypi/" versioned-name "/json")) + json->pypi-project))) ;; For packages found on PyPI that lack a source distribution. (define-condition-type &missing-source-error &error missing-source-error? - (package missing-source-error-package)) + (package missing-source-error-package)) (define (latest-source-release pypi-package) "Return the latest source release for PYPI-PACKAGE." @@ -371,7 +373,7 @@ be extracted in a temporary directory." (invoke "tar" "xf" archive "-C" dir))) (let ((requires.txt-files (find-files dir (lambda (abs-file-name _) - (string-match "\\.egg-info/requires.txt$" + (string-match "\\.egg-info/requires.txt$" abs-file-name))))) (match requires.txt-files (()