From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id 8Gn1I4NqK2Ye7AAAe85BDQ:P1 (envelope-from ) for ; Fri, 26 Apr 2024 10:49:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 8Gn1I4NqK2Ye7AAAe85BDQ (envelope-from ) for ; Fri, 26 Apr 2024 10:49:07 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=Dky26wlH; 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=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1714121347; 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: 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=+bPBwel8pp2of9zLC2W73K8f7qj1lqZ34ZG3TiOguDA=; b=q2mOmA0/Y4ubycbG4EXaUKCqNkKxwMSsi2sROcxfSs7cZUthpqOUZntIM1Ys17BLHhedim REVBoYN2ahXlMcnx9vIpiJ19t4thbGykNmq2WgprHIW4TXycMsWYOM9fLKIG822Equd9xE Hw/bayMHwxaBjNDtppQKt/ZVyJYHWNB92UiAn/qK6VaejxskhyKxqLuYjSB2qMxrgoKqam MnoXwlap05KUJP3u0HOoktQw5DawPF/8jc48kWotJ5NwTl+puxJN8TBR+Wv6YIn3ct7XRJ af+gIkTyWIkgDzf4E/1R1ONK9I41sv5+w8dU3jYu6/aryVyf0syoYBsFhwaz0g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1714121347; a=rsa-sha256; cv=none; b=l2ZQ92A5dUwmDjW1RG3qAwTHrQcz6HJtSWDmjkSDUtZXActYIpzIcd0GRTlCtWWiLVXtA0 1/Cm8f96Ls8Vwj+kcVS0AuD/pAMYfn2qarWm/2yU37f2aV54FGnJ9lCF3pFXk46tsxg52v jwudkQqsOD/VOLHiijb8Odd3gBfFj5snf/y94I7Po/LHJaNY/hkcB6/Sqsp26ea+yU1q47 9hTzeiZuucXaOw3rC7Tuz11GnhK/uqktYq9rw/UiOCXl9mt9YhOVzKgaEc6LHELnlNrdSs 6kiCY/ycOAbKtxZ7TMw4oicxREgotmUB2ZiPe0/tDrxJPxdUWfdmwODaE5SM8g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=Dky26wlH; 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=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=none) 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 4850560ED0 for ; Fri, 26 Apr 2024 10:49:07 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s0HGG-0006od-NC; Fri, 26 Apr 2024 04:48:52 -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 1s0HGD-0006oC-KB for guix-patches@gnu.org; Fri, 26 Apr 2024 04:48:49 -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 1s0HGD-0005vZ-Bu for guix-patches@gnu.org; Fri, 26 Apr 2024 04:48:49 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s0HGV-0004h0-5l for guix-patches@gnu.org; Fri, 26 Apr 2024 04:49:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70570] [PATCH 2/2] guix: pyproject-build-system: Ignore unwanted pytest flags. Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 26 Apr 2024 08:49:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70570 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Graves Cc: 70570@debbugs.gnu.org Received: via spool by 70570-submit@debbugs.gnu.org id=B70570.171412130417464 (code B ref 70570); Fri, 26 Apr 2024 08:49:06 +0000 Received: (at 70570) by debbugs.gnu.org; 26 Apr 2024 08:48:24 +0000 Received: from localhost ([127.0.0.1]:33940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s0HFl-0004XM-Ug for submit@debbugs.gnu.org; Fri, 26 Apr 2024 04:48:23 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:43910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s0HFg-0004Uz-8A for 70570@debbugs.gnu.org; Fri, 26 Apr 2024 04:48:19 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4VQmZX6dBHz9sml; Fri, 26 Apr 2024 10:47:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1714121268; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=+bPBwel8pp2of9zLC2W73K8f7qj1lqZ34ZG3TiOguDA=; b=Dky26wlHMjSggQCFMH0DDWezd3dGESX9jm9TdGMLUXq8Dec0UHVYHSmCPDVa8kazEcGTi7 QTwVoOIJO5JRjiFzqZDU0a1Lr86GK5Cgho57KL751hXxSigs94tXJeU1gU30hO0LWt0Y+e RY16tB7TFVxMuYlF7zrYC20bCECgfwrCu4IYc2j7sjZCjTEQOABVe6ggyLGxizagSCvTjf LfyLbKkczHT520hhXmkC45ZL2eVOyvBm4dCq1g1ZdpaUNWUByQrrSHa9h2N8cL0xOniKzN bm48+TJJVwZtZmcErKf0nQO1GXZVg2lJo3sRv6YQusjhGug5h8Uo1SypqiENuw== Date: Fri, 26 Apr 2024 10:47:47 +0200 From: Lars-Dominik Braun Message-ID: References: <20240425160010.6243-1-ngraves@ngraves.fr> <20240425160010.6243-2-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240425160010.6243-2-ngraves@ngraves.fr> 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: , 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-Spam-Score: 2.95 X-Spam-Score: 2.95 X-Migadu-Queue-Id: 4850560ED0 X-Migadu-Scanner: mx12.migadu.com X-TUID: O8c/6H6G9+j6 Hi, pretty smart idea to use a pytest plugin :) > +;; Pytest plugin to filter out arguments to ignore. > +(define pytest-default-ignore-alist >From the comment it’s not entirely clear to me what this list does. It’s a map from pytest plugin name to it’s pytest command line options, right? > +;; Allow guix to ignore these options when underlying pytest package is not > +;; an input. These flags are not necessary to properly run tests. > +(define (pytest-ignore-options-plugin flags) > + "This function converts an list of flags in a string that can > + be instantiated as a python pytest plugin." … > +(define (call-with-guix-pytest-plugin inputs thunk) Same here. As far as I understand you want to emulate command line options provided by pytest plugins, so pytest won’t fail if the plugin is not present. And we only do that if the plugin is not an input to avoid clashing command line options, right? + for option in options: + group.addoption(option, action='append', nargs='*')" Not sure nargs='*' is a good idea, since it might consume positional arguments intended for pytest. '?' would be a more conservative option, especially since we cannot override this easily per-package. > + (let* ((former-path (getenv "PYTHONPATH")) … > + (dynamic-wind > + (lambda () > + (setenv "PYTHONPATH" … > + (lambda () > + (setenv "PYTHONPATH" former-path) Isn’t it GUIX_PYTHONPATH? Lars