From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id ANzPCIVzQmbSEwAAe85BDQ:P1 (envelope-from ) for ; Mon, 13 May 2024 22:09:41 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id ANzPCIVzQmbSEwAAe85BDQ (envelope-from ) for ; Mon, 13 May 2024 22:09:41 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=I4PkSSXQ; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1715630981; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: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=pH3pRQt5rbzAbELGmuU6ZPWRrvwMLSQwgZ/NvpmyxDY=; b=cVFu6u7qpusxt5sn73WijxfU45DKGG/g0tfIGJVn7iKzpRLuLVwtsamC+6vBzPPfwjWGFt FqmqKMoojmIPZL+dq8TJNwBOcfpX6MxT+xU8slfHb6MnbC6Zc+/UDgchBQgE/4R46Wd+q9 2UR/XYNY9nlBThZiHpGTdqIf0v9NoB0ryG1LsU6HTtmCWB45Ifl/qRVVEgPf+G7d8M/qxs GpjBLjpuSdDiq0PaOO6OXt1jXhwm5Pb7qKp93DbNQD/eG4UV86DTITrFLOXeWZQD/Y927W Yt4/XLZCNXW9y8On4cUzStQZ4bIkv8txeX/5saUQlJMYJTC6nqySCI3ePQOQPA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=I4PkSSXQ; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1715630981; a=rsa-sha256; cv=none; b=sBqLEI8TZWegnTU2IkBAhDZMV//thEVr4RU29Omyisa+xLpVrx6F5/PWPHKLwNer5PUye3 oLaNThmb773EBiSQeyBw1q4iQ3wG16frR6lO7kBLdNtNuVs1G3WZy/MzonKJNU4xhkWe0q Ma60Gc9mKupyxH8x6fAmdm2k6wK8xQ6UMZ8PcW0P8HUiJ9XfW0UBIgWc18z/p0HZrMBIxF 9Qs8KF6ZSywDrCcFVGM07ujNpE/TA+PTzmaGWwm3gYEc91+IaQP2lHwmGjcbSHnYgdzlrA lhSipnOQODR5a94jT/ko0IivY/yfo4qfOBS5WQBAK085MZKsI8wcoQ/nweerCA== 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 0B1476D6EF for ; Mon, 13 May 2024 22:09:41 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s6bz2-0004KF-ME; Mon, 13 May 2024 16:09:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s6byy-0004J7-G2 for guix-patches@gnu.org; Mon, 13 May 2024 16:09:12 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s6byy-0007pR-7V; Mon, 13 May 2024 16:09:12 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s6byr-0000IX-3f; Mon, 13 May 2024 16:09:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70923] [PATCH 07/13] import: pypi: Use 'maybe-list-field' procedure. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, marius@gnu.org, me@bonfacemunyoki.com, sharlatanus@gmail.com, tanguy@bioneland.org, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Mon, 13 May 2024 20:09:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70923 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70923@debbugs.gnu.org Cc: Lars-Dominik Braun , Marius Bakke , Munyoki Kilyungi , Sharlatan Hellseher , Tanguy Le Carrour , jgart X-Debbugs-Original-Xcc: Lars-Dominik Braun , Marius Bakke , Munyoki Kilyungi , Sharlatan Hellseher , Tanguy Le Carrour , jgart Received: via spool by 70923-submit@debbugs.gnu.org id=B70923.17156309301048 (code B ref 70923); Mon, 13 May 2024 20:09:05 +0000 Received: (at 70923) by debbugs.gnu.org; 13 May 2024 20:08:50 +0000 Received: from localhost ([127.0.0.1]:34604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6byb-0000Gk-Ik for submit@debbugs.gnu.org; Mon, 13 May 2024 16:08:49 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:40155 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6byS-0000El-FQ for 70923@debbugs.gnu.org; Mon, 13 May 2024 16:08:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1715630908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pH3pRQt5rbzAbELGmuU6ZPWRrvwMLSQwgZ/NvpmyxDY=; b=I4PkSSXQyR65/ueXn3mj6wGJCRWp1DJ3uK6aRdpx8q4M04SiumJ+et2qnXBTfPlcAhO2gm rWBqRwkZNNk5Oe0ZAhgdjoTZ4OT8DFXLhOx6dhabUwa2XkaAzfuh8dra4Js/6Ca1O3KmRa +ML3lHx/vxpU80Yr8lTdiCNLn2/roZH6TRegjJHPW6sLADks6xN7JEPnl9r/SgITotGEhh oUPzvNrwu4nsScmn55b0a+aZnSruS9xS2Qxv6YBT/VIXd+CeTUpIoiKsHls7ZaOBs6e61Z xXtXexVMHbS6wuSJ7xhjxhHlaY+fcrE0PhMPpStT4w7UZSbyVBuVpe+k7RrIEQ== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id c83447e8 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <70923@debbugs.gnu.org>; Mon, 13 May 2024 20:08:28 +0000 (UTC) Date: Mon, 13 May 2024 22:08:04 +0200 Message-ID: <210d22fd9d577748a23093df1e162a36373688a6.1715627497.git.herman@rimm.ee> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches From: Herman Rimm via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -6.37 X-Migadu-Queue-Id: 0B1476D6EF X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -6.37 X-TUID: Xvx4nVeKX6hu * guix/import/pypi.scm (maybe-inputs): Delete procedure. (make-pypi-sexp): Use 'maybe-list-field' and 'maybe-upstream-inputs' procedures. --- guix/import/pypi.scm | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index 6719fde330..c46f8897b9 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -201,18 +201,6 @@ (define (wheel-url->extracted-directory wheel-url) ((name version _ ...) (string-append name "-" version ".dist-info")))) -(define (maybe-inputs package-inputs input-type) - "Given a list of PACKAGE-INPUTS, tries to generate the 'inputs' field of a -package definition. INPUT-TYPE, a symbol, is used to populate the name of -the input field." - (match package-inputs - (() - '()) - ((package-inputs ...) - `((,input-type (list ,@(map (compose string->symbol - upstream-input-downstream-name) - package-inputs))))))) - (define %requirement-name-regexp ;; Regexp to match the requirement name in a requirement specification. @@ -538,10 +526,10 @@ (define* (make-pypi-sexp pypi-package bytevector->nix-base32-string))))) ,@(maybe-upstream-name name) (build-system pyproject-build-system) - ,@(maybe-inputs (upstream-source-propagated-inputs source) - 'propagated-inputs) - ,@(maybe-inputs (upstream-source-native-inputs source) - 'native-inputs) + ,@(maybe-upstream-inputs 'propagated-inputs + (upstream-source-propagated-inputs source)) + ,@(maybe-upstream-inputs 'native-inputs + (upstream-source-native-inputs source)) (home-page ,(project-info-home-page info)) (synopsis ,(project-info-summary info)) (description ,(beautify-description -- 2.41.0