From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id UA8dFWKXB2QACQAASxT56A (envelope-from ) for ; Tue, 07 Mar 2023 20:58:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id SGQWFWKXB2QtIQAA9RJhRA (envelope-from ) for ; Tue, 07 Mar 2023 20:58:26 +0100 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 2E45F4333 for ; Tue, 7 Mar 2023 20:58:26 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZdRs-0000xh-AQ; Tue, 07 Mar 2023 14:58:22 -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 1pZdRj-0000xM-34 for guix-patches@gnu.org; Tue, 07 Mar 2023 14:58: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 1pZdRi-00057S-Qw for guix-patches@gnu.org; Tue, 07 Mar 2023 14:58:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pZdRi-0008DH-NK for guix-patches@gnu.org; Tue, 07 Mar 2023 14:58:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#62038] [PATCH 2/2] gnu: python-hy: Report version. Resent-From: Jack Hill Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 07 Mar 2023 19:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62038 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62038@debbugs.gnu.org Received: via spool by 62038-submit@debbugs.gnu.org id=B62038.167821907431549 (code B ref 62038); Tue, 07 Mar 2023 19:58:02 +0000 Received: (at 62038) by debbugs.gnu.org; 7 Mar 2023 19:57:54 +0000 Received: from localhost ([127.0.0.1]:47242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZdRa-0008Ci-0J for submit@debbugs.gnu.org; Tue, 07 Mar 2023 14:57:54 -0500 Received: from minsky.hcoop.net ([104.248.1.95]:35988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZdRY-0008CN-A7 for 62038@debbugs.gnu.org; Tue, 07 Mar 2023 14:57:52 -0500 Received: from [2001:470:8:9f5:e878:315c:5ed6:89d] (helo=leyden.home.eronel.org) by minsky.hcoop.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZdRT-0005dH-5I for 62038@debbugs.gnu.org; Tue, 07 Mar 2023 14:57:47 -0500 From: Jack Hill Date: Tue, 7 Mar 2023 14:57:36 -0500 Message-Id: <20230307195736.29985-2-jackhill@jackhill.us> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230307195736.29985-1-jackhill@jackhill.us> References: <820c5bf3-4d3d-0a2e-298b-5b446cf08e94@jackhill.us> <20230307195736.29985-1-jackhill@jackhill.us> 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: , 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678219106; h=from:from:sender:sender: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: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; bh=1zSQGz4xF01fvreqblD3y8XBfnDJdVlBcRLYY47uwdc=; b=Kumt66q+1ik8FA37tEp2ihby52JenxtsFJ8IbdGon2O3Q76mzacmNMnXq3o1rNGLMUfr8W FlE2J845EqXsNIUqLfzxMxPeBceNAZ2LOlw9ysboa2JhgWPmTUU6g4nliOVqxhLBy4u0Pm yeUYW9GW4d4+ojMgPGyZRL8PppE0eRVkwTQnhcEPk64744AgPS9zjgrcLB7IJeF57kzowZ SLijkaIaJKsC0rYCPb0QLKHDiBxs1UF074omK2jiRBPqB9k2haMCW34osA8Eq6R2TqX3/O AvuG8gLmG9GEKNURhhUoWvgu9qfugMyoO8TWNaFSHU7InxKdmQlMOSnzspcXkg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678219106; a=rsa-sha256; cv=none; b=MnW71XAsgHbU31dv7WjOZkGjCjWPRj4U+8P7apKPbRgHDM4KVp6KW3HBL7dH5MqjY2NABF kQCeoE1yd3yaygkx/fjFPE4waykbuPJ/tNKFg/XJootxtj4riD0t1IqnAQ/4wCAPJAGb2v b4j0/yljuQljKciOvNRZZqTKEKUx1F5fon2jPMMs19xrPspXRw04a7qVxYx5lp6pQpguCa vYEJe+jo7/QS26e0Z9C36rq/FMzei7CAccY0PM5kbvkm8AS+I1PDmvh9Lizylbjhhnb9PE EDPmZupVQ1ChGeonXe4c5iSc9sQBPAVG+xSO1mlNjBtqSHIdNrFfU5aYW5rYqQ== Authentication-Results: aspmx1.migadu.com; dkim=none; 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=none X-Migadu-Spam-Score: -0.70 X-Spam-Score: -0.70 X-Migadu-Queue-Id: 2E45F4333 X-Migadu-Scanner: scn1.migadu.com X-TUID: mBm3joC4N0VM * gnu/packages/python-xyz.scm (python-hy)[arguments]{phases}: Add set-version and remove-installed-build-scripts. --- gnu/packages/python-xyz.scm | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 7a1866314e..88138db1f4 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -58,7 +58,7 @@ ;;; Copyright © 2015, 2018 Pjotr Prins ;;; Copyright © 2019, 2020 Brett Gilio ;;; Copyright © 2019 Sam -;;; Copyright © 2019 Jack Hill +;;; Copyright © 2019, 2023 Jack Hill ;;; Copyright © 2019, 2020, 2021, 2022 Guillaume Le Vaillant ;;; Copyright © 2019, 2020 Alex Griffin ;;; Copyright © 2019, 2020, 2021, 2022 Pierre Langlois @@ -15020,17 +15020,29 @@ (define-public python-hy (base32 "1czhh7s81sg0nrnf4zv0ydqi4f7s6sywf4ks4fd59vpx441ca39v")))) (build-system python-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "python" "-m" "pytest" "-k" - (string-append ; skip some failed tests - "not test_sys_executable" - " and not test_circular_macro_require" - " and not test_macro_require" - " and not test_requires_pollutes_core")))))))) + (list + #:phases + #~(modify-phases %standard-phases + ;; Hy includes a script that writes a version.py file the Hy uses to + ;; report its version. That script uses information from the git + ;; repository or the HY_VERSION environment variable. Therefore, + ;; these phases et HY_VERSION and then remove the support scripts + ;; which get installed in the root of the output. + (add-after 'unpack 'set-version + (lambda _ + (setenv "HY_VERSION" #$version))) + (add-after 'install 'remove-installed-build-scripts + (lambda _ + (delete-file-recursively (string-append #$output "/get_version")))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python" "-m" "pytest" "-k" + (string-append ; skip some failed tests + "not test_sys_executable" + " and not test_circular_macro_require" + " and not test_macro_require" + " and not test_requires_pollutes_core")))))))) (native-inputs (list python-pytest-7.1 python-wheel)) (propagated-inputs -- 2.39.1