From patchwork Sun Jul 4 16:45:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: slg <0x2d@disroot.org> X-Patchwork-Id: 31133 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D848027BC81; Sun, 4 Jul 2021 17:46:08 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8E77B27BC78 for ; Sun, 4 Jul 2021 17:46:08 +0100 (BST) Received: from localhost ([::1]:59946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m05Fv-0004Cd-Gp for patchwork@mira.cbaines.net; Sun, 04 Jul 2021 12:46:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54352) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m05Fp-0004CP-RU for guix-patches@gnu.org; Sun, 04 Jul 2021 12:46:01 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59883) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m05Fp-0001UD-Jp for guix-patches@gnu.org; Sun, 04 Jul 2021 12:46:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m05Fp-0004lK-J3 for guix-patches@gnu.org; Sun, 04 Jul 2021 12:46:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49123] [PATCH 20/24] gnu: Add python-plyer. Resent-From: slg <0x2d@disroot.org> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 04 Jul 2021 16:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49123 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos , 49123@debbugs.gnu.org Received: via spool by 49123-submit@debbugs.gnu.org id=B49123.162541714917571 (code B ref 49123); Sun, 04 Jul 2021 16:46:01 +0000 Received: (at 49123) by debbugs.gnu.org; 4 Jul 2021 16:45:49 +0000 Received: from localhost ([127.0.0.1]:43196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m05Fc-0004Yz-Qj for submit@debbugs.gnu.org; Sun, 04 Jul 2021 12:45:49 -0400 Received: from knopi.disroot.org ([178.21.23.139]:43598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <0x2d@disroot.org>) id 1m05Fa-0004Vn-Gd for 49123@debbugs.gnu.org; Sun, 04 Jul 2021 12:45:47 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id D6E4682B27; Sun, 4 Jul 2021 18:45:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BzSLhPJxnUVe; Sun, 4 Jul 2021 18:45:43 +0200 (CEST) Message-ID: <85604f193efced6daaa138b573c8603f74a951f9.camel@disroot.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1625417142; bh=E4l8mT0AzF+htoAdSic2Tgw0LBcaCeIlW+njGkD5Ni4=; h=Subject:From:To:Date:In-Reply-To:References; b=HuHFudL8ExmepP1LLqNvrsfMiS0eHvIGKn+6IYZxMD9ILsmSUfle1XiXY8cv2jZ7m FhuY9SO698VTa4ft5G4zp9SqmVcpva3mZepf/zRApYDSdLFTlxKuimnagddhaAZsVf 7PrbLbBUu26pPkT2M62kHmD5qv0Df6Qb9p+5qDCwiTH1su09rmvong/gbMArskslEq vQe7iudrdglJnjJRV6HQV8OrwhRtuyLN2VaKX67amjY2PCtqSbpTILhOzUvlXC1RZu I4A5qJxJW3v4VfFqS0p7kE5V59FdjKOFcMxGIjB/9+ZPnDdKMaBCS0VyqBf697khSO CO+SkMm/H/Rbw== Date: Sun, 04 Jul 2021 13:45:30 -0300 In-Reply-To: References: <20210620010742.4259-1-0x2d@disroot.org> <20210620010742.4259-20-0x2d@disroot.org> Mime-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: slg <0x2d@disroot.org> X-ACL-Warn: , slg via Guix-patches X-Patchwork-Original-From: slg via Guix-patches via From: slg <0x2d@disroot.org> X-getmail-retrieved-from-mailbox: Patches On Mon, 2021-06-21 at 17:53 +0200, Maxime Devos wrote: > > You can try to work-around the cycle > by defining two python-plyer packages, like this > (fill in the ...): > > (define-public python-plyer >   (package >     (name ...) >     (version ...) >     (build-system ...) >     ;; do not add (arguments ...) here! >     ;; (This comment should not go into the revised patch) >     (native-inputs >       ;; Add a comment on why this is necessary >       `(("python-plyer" ,python-plyer-for-tests))) >     (home-page ...) >     (synopsis ...) >     (description ...))) > > (define python-plyer-for-tests >   (package/hidden >     (inherit python-plyer) >     (native-inputs '()))) > > That way, first a python-plyer without tests will be built, > and then the real python-plyer will be built with tests. I tried the attached patch, but it still fails with same errors when trying to run tests. At this point I don't know if python-plyer-for- tests is being built before or not. Sincerely, slg diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 5b13394824..694fde25e4 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -26128,14 +26128,26 @@ is a Python port from filetype Go package.") (base32 "156z58gzb3afzilhdbsm323sn0sky1n59kgaxmpg73a3phbqpqwd")))) (build-system python-build-system) - (arguments - `(#:tests? #f)) ;; Circular dependency on itself + (native-inputs + ;; Needed because plyer cannot find itself when doing tests + `(("python-plyer" ,python-plyer-for-tests) + ("which" ,which) + ("xbacklight" ,xbacklight))) (home-page "https://plyer.readthedocs.io/en/latest/") (synopsis "API for common features found on various platforms") (description "Plyer is a platform-independent api to use features commonly found on various platforms, notably mobile ones, in Python.") (license license:x11))) +;; Used for testing on python-plyer +(define python-plyer-for-tests + (hidden-package + (package + (inherit python-plyer) + (arguments + `(#:tests? #f)) + (native-inputs '())))) + (define-public python-baron (package (name "python-baron")