From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 0F27FkmXE2SMIAAASxT56A (envelope-from ) for ; Thu, 16 Mar 2023 23:25:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 2GHOFUmXE2RtsgAAG6o9tA (envelope-from ) for ; Thu, 16 Mar 2023 23:25:13 +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 14DFB3DF69 for ; Thu, 16 Mar 2023 23:25:12 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679005513; 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=xQMvymcTbCRn4lZifFppFOOrzZ0EV5kPdM4gYIit2Gw=; b=ndgx1b6KGF2u7j1LkixIh+Pw1NvBe2kR2p6k5+ZgtFYB/xmkumli/qFwv5t4l5MsY3C/zm zaAEMw3Mdw84qIFAoVpcTJjHaNj7Pt37hBnPgkn3vfF950ZVgEvxy56cnfi+PQ9JV3+EP7 GuMZ/eZxYdZxe2LShy1kIZMKGH5AHtMZJMd63C/or0iuovQtP6IZVfxUktQkKpthJKuQKO 2rrHIuFJzwE9QES4NxhDTsPBKm+VkJb0Cv1BQh5k+cbPIhfkskSahL30PZQ7sDfQYTVSw8 4saF0JCV1gzrwn72m3AC94901IsInp6OZ4afoGRgW38ivwc520z1+XhpSN/fPg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679005513; a=rsa-sha256; cv=none; b=Sz5zIdqHVMqLQuZCosUEime+w1wNfP9oaf1v/QiyqSnlyKZ3DxmFfDGiWp3EQBROhWv1XT pZYbwief/D4A/4jdxIczXKFFe12QtF9m8w/B8tr+3tBGKAg+6fqwSrks+bwhI8UOUMpurH waEWQMnapooapZZu2sMBur2PpAqIY8oBUejgLyBdHQPFP4Uy8rmn0m0GJXrd8C/i9GN/HA 4pBKHis7bNRI5b7HDQS8BY/XxxsaFTTOuxMreh30g5/evBS5lkiIzjz+4fuwNbh318pzV+ 0oJa876qBZu1ZGXvIq/T1m+7nUFykacjXlP8V4se/arbHKoCtYNmGRN9I9kJcA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pcw1y-0003vA-9B; Thu, 16 Mar 2023 18:25:06 -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 1pcw1u-0003uk-Mv for guix-patches@gnu.org; Thu, 16 Mar 2023 18:25:02 -0400 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 1pcw1u-0003u0-C1 for guix-patches@gnu.org; Thu, 16 Mar 2023 18:25:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pcw1u-0000D4-7K for guix-patches@gnu.org; Thu, 16 Mar 2023 18:25:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62038] [PATCH v3 2/2] gnu: python-hy: Report version. Resent-From: Jack Hill Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 Mar 2023 22:25: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.1679005481771 (code B ref 62038); Thu, 16 Mar 2023 22:25:02 +0000 Received: (at 62038) by debbugs.gnu.org; 16 Mar 2023 22:24:41 +0000 Received: from localhost ([127.0.0.1]:43297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcw1Z-0000CM-CX for submit@debbugs.gnu.org; Thu, 16 Mar 2023 18:24:41 -0400 Received: from minsky.hcoop.net ([104.248.1.95]:45470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcw1Y-0000C4-2H for 62038@debbugs.gnu.org; Thu, 16 Mar 2023 18:24:40 -0400 Received: from libre-01.lib.duke.edu ([152.3.119.171] helo=localhost.localdomain) by minsky.hcoop.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcw1S-0006z7-Up for 62038@debbugs.gnu.org; Thu, 16 Mar 2023 18:24:35 -0400 From: Jack Hill Date: Thu, 16 Mar 2023 18:24:23 -0400 Message-Id: <20230316222423.23757-2-jackhill@jackhill.us> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230316222423.23757-1-jackhill@jackhill.us> References: <20230316222423.23757-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: X-Migadu-Queue-Id: 14DFB3DF69 X-Spam-Score: -3.54 X-Migadu-Spam-Score: -3.54 X-Migadu-Scanner: scn0.migadu.com 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 X-TUID: 3mNbU66OH0Nw * 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 509bfa77d6..a5a2048fb5 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 @@ -15039,17 +15039,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 that Hy uses to + ;; report its version. That script uses information from the git + ;; repository or the HY_VERSION environment variable. Therefore, + ;; these phases set 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.2