From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id CDB1JWxMV2deWwAA62LTzQ:P1 (envelope-from ) for ; Mon, 09 Dec 2024 20:00:44 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id CDB1JWxMV2deWwAA62LTzQ (envelope-from ) for ; Mon, 09 Dec 2024 21:00:44 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=F5oLP7T5; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=h9SFkDKI; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1733774444; a=rsa-sha256; cv=none; b=rL4ah1dUKGhBvQMfpgWjcrrLVaZCb/Zr+06Xl6fKd7bMnBj96elh60jO5co2QgbOHRXtGR RzoaV75yiIc48VqLl6UzwfDUwKAfoHaojbqZ0awQf0tBVKRyDyKFdzQZZmk+6WYxxmWCm5 U53VAoUdbvPxT2o/L8cfjDwJq0q39CH0PlY47zaBjIFOr34tpmPU7FEcyZx4CyxgE9bOpA s/qc+YaBxnnerYF5VqYhi859olmbpBW4g1a6kiMk9JBHXH/8QEILmleXuyyLVDemyBcVLk tpnm5XAnVN9dPJBKgNFCSQXdyLkZVzrDE9grHX50e2HTn48by4Do/e7NzGxVgA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=F5oLP7T5; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=h9SFkDKI; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1733774444; 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-type:content-type: 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=4mDVhUQiS/kTiBFbsxiWrC3jCC+6QYxmfOifyMbMUio=; b=d2FZSEVtA1DYVWONC1bqcwJtmfBmOSDSSb6mXECnIz96Hcc/qmch+Tn2cKDvqKtkAYSnMc 4JAVo56+IH8EeAIM79ZQZURpPMMrJQU2w8P8jJ1aX8ohWEKdV4DB8anXTNtOgd17tNVwIc Q0+7cV6AbLzSTjg2jjQbtqfRG6VlvfmcFaXdwlFbEZQNbK1ub9ogZ06sTkC4/pw8IaRO6A VHtaO9nUcn37uadYdKz/JNJa+Vhe2gbBKt4sqVv+Pwn444Ng5SbzWYY63G6Qgw2FlQLsso lfQ66IPX2d4VY+P/xGC/puVMWUFql9SXisYd3/jKWvBiwfOY3w6vAcxL7x4AVg== 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 4C8517B3F6 for ; Mon, 09 Dec 2024 21:00:44 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKjve-0005M9-Li; Mon, 09 Dec 2024 15:00:26 -0500 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 1tKjva-0005LE-Pv for guix-patches@gnu.org; Mon, 09 Dec 2024 15:00:22 -0500 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 1tKjva-0007ZX-5u; Mon, 09 Dec 2024 15:00:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=4mDVhUQiS/kTiBFbsxiWrC3jCC+6QYxmfOifyMbMUio=; b=F5oLP7T5h5KNiM/t2zrXRfnFafdruZdG9mzNclm/73BR4tw0knSMUhMv6uHx7peO34J6zo7s8q2W795g5wt9mT+tlPCzTzO01CDekQp1NWoktDZQJ3lRlyrSFZEjB65O7SQqeN40DjebrCJk04Pjw7C5S7wNyZXRX0AEMajohNQJf1y/Btow2/jTd9iQZGPzZauO+bicTea0t+UgqygdNh1A8ZvII/XQ47AlQQxWyRwBHuK20Cbnq62qBuGfXIfdbUyVzJSl2oh6ma7ESH27LpyzYDbDtrpo3zdjeuS+mQAkqXDQ23hj6CeWWK1Am4BbbyqyyH/M4cuQrRNqAUvYuQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tKjvQ-0002JI-JG; Mon, 09 Dec 2024 15:00:12 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#70923] [PATCH v4 05/11] 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, 09 Dec 2024 20:00:12 +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.17337743778345 (code B ref 70923); Mon, 09 Dec 2024 20:00:12 +0000 Received: (at 70923) by debbugs.gnu.org; 9 Dec 2024 19:59:37 +0000 Received: from localhost ([127.0.0.1]:55755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKjuq-0002AS-MR for submit@debbugs.gnu.org; Mon, 09 Dec 2024 14:59:37 -0500 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:57961 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKjuh-00027s-Pt for 70923@debbugs.gnu.org; Mon, 09 Dec 2024 14:59:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1733774352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4mDVhUQiS/kTiBFbsxiWrC3jCC+6QYxmfOifyMbMUio=; b=h9SFkDKIPrAHJzqvTr1ULhRPPiyvCciPNwdvz9VUKUbrOd/+Utx0HbS/1eTcrIIsai+Pow 3pt6EwartTHryfdzobrYsSmnADWdBL9mu5sfou/EwgG5w5sL3vi7TheKIsuPNU0kSvEekx hDbINfgedru1TRpwrPGYNozN0ambZ4YPh7XmyB67x88y9m0Kt241qGMbth5GoBZb8z+fQ5 tmL2n24vd6ffxGguQbGZ0sxWloodynVhkWzvvfgZpQq7SOhih7dvD7hmajBfAbH7qUG7eF gBsSVoAZWG3BqYsSQ0qmk+QO7BZhcF62wQhqJ1z2Zerhb9ZmGgB77e5ux7PvBg== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 8d064f23 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <70923@debbugs.gnu.org>; Mon, 9 Dec 2024 19:59:12 +0000 (UTC) Date: Mon, 9 Dec 2024 20:58:09 +0100 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: <4b8cde409e17e4b9ab7ef591eff605b88235fb0a.1733774143.git.herman@rimm.ee> References: <4b8cde409e17e4b9ab7ef591eff605b88235fb0a.1733774143.git.herman@rimm.ee> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 4C8517B3F6 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -6.66 X-Spam-Score: -6.66 X-TUID: VrCMV35kZ9Pz * guix/import/pypi.scm (maybe-inputs): Delete procedure. (make-pypi-sexp): Use 'maybe-list-field' and 'maybe-upstream-inputs' procedures. --- guix/import/pypi.scm | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index 7b9f54a200..a98fdfa604 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2022 Vivien Kraus ;;; Copyright © 2021 Simon Tournier ;;; Copyright © 2022 Hartmut Goebel +;;; Copyright © 2024 Herman Rimm ;;; ;;; This file is part of GNU Guix. ;;; @@ -201,18 +202,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 +527,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 ,(and=> (non-empty-string-or-false -- 2.45.2