From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 CCmMEKuVE2QGCQEASxT56A (envelope-from ) for ; Thu, 16 Mar 2023 23:18:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id GKc/EKuVE2QEfwEAauVa8A (envelope-from ) for ; Thu, 16 Mar 2023 23:18:19 +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 00BD53E007 for ; Thu, 16 Mar 2023 23:18:18 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pcvvB-0002lx-NK; Thu, 16 Mar 2023 18:18:05 -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 1pcvv9-0002lf-AQ for guix-patches@gnu.org; Thu, 16 Mar 2023 18:18:03 -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 1pcvv9-0001vF-2U for guix-patches@gnu.org; Thu, 16 Mar 2023 18:18:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pcvv8-0008T4-UH for guix-patches@gnu.org; Thu, 16 Mar 2023 18:18:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62038] [PATCH v2 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:18: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.167900507332520 (code B ref 62038); Thu, 16 Mar 2023 22:18:02 +0000 Received: (at 62038) by debbugs.gnu.org; 16 Mar 2023 22:17:53 +0000 Received: from localhost ([127.0.0.1]:43287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcvuz-0008SN-4D for submit@debbugs.gnu.org; Thu, 16 Mar 2023 18:17:53 -0400 Received: from minsky.hcoop.net ([104.248.1.95]:38508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcvux-0008S4-DQ for 62038@debbugs.gnu.org; Thu, 16 Mar 2023 18:17:52 -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 1pcvus-0006kK-9t for 62038@debbugs.gnu.org; Thu, 16 Mar 2023 18:17:46 -0400 From: Jack Hill Date: Thu, 16 Mar 2023 18:17:34 -0400 Message-Id: <20230316221734.23689-2-jackhill@jackhill.us> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230316221734.23689-1-jackhill@jackhill.us> References: <20230316221734.23689-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-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=1679005099; a=rsa-sha256; cv=none; b=u4giw1a/vgjuapw5cfiSMJmvjcUIM0v89KDpPlmhc/xS/H+9HImHLjk5Y2WRryChkKyZfz k9NvN2jT/EZeokq3f9LrT/kSUugKWObBUmBzXxItJbKcNyKX+njbucaR8u7rno0Nyc9fu+ Re+Aq/Jo80JxNS8v6nvNaa5nGQx0lPFrXZrw+CJF1oWVokSO4/mvM+taiXS3C/e6EJhgiS q+UQ/LTmckTFn7VvyD7R5dzB89S6dzFDe5pUq80pVkob009Oqyhg0Abp78Kew9ebB85/Zs QsIIs13Wu+BLl+y7TXrzyASSyv5nrXdWsYGnjTAO/eEMYitXzV4iN9w2b2IE4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679005099; 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=KnSgfeHskXXDnpPsg+0UTfZBoLGPKmXaoXyy+F6zMCg=; b=HHeinj9YfTVV34WrmwvwC1I/gRHHaulorS+FRB6SP0E/cPj6HgddWVAkHqgTWeZCobYCo/ auTQjP/K3HVAXDS06Pmx1HyDkOv0QNAp4x9j0GAPXhT94LqKkgJAV/H4n6QNez8e7RTTpK fvo+RQ6bibbgWGMpPqsNJNJCB0llMemuDDcUHnJdQvBMMiT5n8bEKLz09tTU8AXnjRAuly eoi37K67fKyCCef3WQz6RcTkiqrVYl+eBNgiOVJkKKhhiNtNopHniUFWdySUMgSNpDwdP4 KPSdOHIzIidwHHeHlL9Vu0vSss1OlkMozBL3q6CuKRyBcNV3WntVR1Kfq2gRhA== X-Migadu-Spam-Score: -2.24 X-Spam-Score: -2.24 X-Migadu-Queue-Id: 00BD53E007 X-Migadu-Scanner: scn1.migadu.com 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-TUID: WJlZpRsyawfT * 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..3dc1a0834c 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 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.2