From patchwork Wed Mar 8 23:26:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sharlatan Hellseher X-Patchwork-Id: 47808 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 18AF716E3B; Wed, 8 Mar 2023 23:27:51 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8955E16E33 for ; Wed, 8 Mar 2023 23:27:50 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pa3Ba-0005BM-3P; Wed, 08 Mar 2023 18:27:06 -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 1pa3BY-0005AY-DS for guix-patches@gnu.org; Wed, 08 Mar 2023 18:27:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pa3BY-0001gs-4y for guix-patches@gnu.org; Wed, 08 Mar 2023 18:27:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pa3BY-0008U6-1T for guix-patches@gnu.org; Wed, 08 Mar 2023 18:27:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#62061] [PATCH 2/3] gnu: python-plotly: Fix version detection. Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 08 Mar 2023 23:27:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62061 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62061@debbugs.gnu.org Cc: Sharlatan Hellseher Received: via spool by 62061-submit@debbugs.gnu.org id=B62061.167831800932557 (code B ref 62061); Wed, 08 Mar 2023 23:27:04 +0000 Received: (at 62061) by debbugs.gnu.org; 8 Mar 2023 23:26:49 +0000 Received: from localhost ([127.0.0.1]:50393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pa3BI-0008Sx-LK for submit@debbugs.gnu.org; Wed, 08 Mar 2023 18:26:48 -0500 Received: from mail-wm1-f44.google.com ([209.85.128.44]:40650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pa3BG-0008SP-SU for 62061@debbugs.gnu.org; Wed, 08 Mar 2023 18:26:47 -0500 Received: by mail-wm1-f44.google.com with SMTP id fm20-20020a05600c0c1400b003ead37e6588so2405423wmb.5 for <62061@debbugs.gnu.org>; Wed, 08 Mar 2023 15:26:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678318001; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1/UVxW+Nv2+Sa6Y05hkTzok7cUcF3Ds8HmZn7DyJMlk=; b=N3RHoidlAqpOGMYDN+ilHEVRDdsieL/qppnStBR+aocoMQYC9r7abFWXFWW4l04A9X k6aL1fPJecS5c+725nVDkrDBpuVuhCBpYxbTbS1yl/ScBNGxMDKasKeM+sLX55S3Qu0a Oj0rnDAFS9+P6GUL4IAwtDGgybwxGmglJ020ApoQmVwtVWYNMvEds8tPQ9rmwPY3g0Fr YGAC39H9NH5zE9ZU290aEQwfnr62fvfSRBGEY70FTX9c9H56abqby2jwozFKXpEbzkp0 ZnMYrlR+a4MK/5v1HPE7gGprXBa0rouxJ/WIi4M2EuITkwle5hW8Jp9QvIb1ddyxNLnA bvjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678318001; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1/UVxW+Nv2+Sa6Y05hkTzok7cUcF3Ds8HmZn7DyJMlk=; b=HLHfiCgl/crk75nGptuvdPUHR4NJpeHXEQ59pfycZ+PscEfRQIDgPy3IqE6+7NS9og vuAcjEERIEcf1yY+fPldoxgVGfnP0WBqyX/A0kBa8R6hI8z+HbJACIueHmgClwEAPf7v 5+QMHRTyM/fJnYyJbgdj3pIP3wfGNzTslm9RDagPjs68qB4NdtJMC6LAxQorqfTivlT8 pZAzasARw9rYLjeo0V9k192qu2lOqPsFoDG/iRSamX3fxP29rlfCHNoTaS9G4J02CHTM oxXvpof89496NbrPWuu34bOGrlGdnKJrvagZX65cfvU4o/vOIMmbVEPpuSRxF6Efq6N3 JjgQ== X-Gm-Message-State: AO0yUKXGTbKF2WFjkW5Egs8J+wxhTk9EIY/e+pv7jYFW9WmUPF9lQrkc ST3htzfxdxOr3xlvGB8YVENO4byu+Rc= X-Google-Smtp-Source: AK7set9AEjcj14POlgmrX85zwUXHfHQKiKTyc1T6YcfGfBC6K2iYNsHp3Bk5Yea9NwXxmKe12ZHGSA== X-Received: by 2002:a05:600c:1d0e:b0:3eb:fc6:79cf with SMTP id l14-20020a05600c1d0e00b003eb0fc679cfmr18686366wms.6.1678318000858; Wed, 08 Mar 2023 15:26:40 -0800 (PST) Received: from guxtil.incerto.xyz (cpc100856-bagu15-2-0-cust368.1-3.cable.virginm.net. [82.25.93.113]) by smtp.gmail.com with ESMTPSA id f2-20020a5d4dc2000000b002be5bdbe40csm16190254wru.27.2023.03.08.15.26.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Mar 2023 15:26:40 -0800 (PST) From: Sharlatan Hellseher Date: Wed, 8 Mar 2023 23:26:36 +0000 Message-Id: <20230308232637.6788-2-sharlatanus@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230308232637.6788-1-sharlatanus@gmail.com> References: <20230308232637.6788-1-sharlatanus@gmail.com> 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/graph.scm (python-plotly): Apply new package style. [arguments]: Add new fix-version phase. [arguments]{phases}: chdir phase, remove trailing #f from lambda. --- gnu/packages/graph.scm | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm index 104fe07b58..603f45ef10 100644 --- a/gnu/packages/graph.scm +++ b/gnu/packages/graph.scm @@ -230,24 +230,30 @@ (define-public python-plotly "0kc9v5ampq2paw6sls6zdchvqvis7b1z8xhdvlhz5xxdr1vj5xnn")))) (build-system python-build-system) (arguments - `(#:phases - (modify-phases %standard-phases + (list + #:phases + #~(modify-phases %standard-phases (add-before 'build 'skip-npm ;; npm is not packaged so build without it (lambda _ (setenv "SKIP_NPM" "T"))) - (add-after 'unpack 'chdir - (lambda _ - (chdir "packages/python/plotly") - #t)) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-x" "plotly/tests/test_core") - (invoke "pytest" "-x" "plotly/tests/test_io") - ;; FIXME: Add optional dependencies and enable their tests. - ;; (invoke "pytest" "-x" "plotly/tests/test_optional") - (invoke "pytest" "_plotly_utils/tests"))))))) + (add-after 'unpack 'fix-version + ;; Versioneer is useless when there is no git metadata. + (lambda _ + (substitute* "packages/python/plotly/setup.py" + (("version=versioneer.get_version\\(),") + (format #f "version=~s," #$version))))) + (add-after 'fix-version 'chdir + (lambda _ + (chdir "packages/python/plotly"))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-x" "plotly/tests/test_core") + (invoke "pytest" "-x" "plotly/tests/test_io") + ;; FIXME: Add optional dependencies and enable their tests. + ;; (invoke "pytest" "-x" "plotly/tests/test_optional") + (invoke "pytest" "_plotly_utils/tests"))))))) (native-inputs (list python-ipywidgets python-pytest python-xarray)) (propagated-inputs