From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 8IXxFSA61WUwcAEA62LTzQ:P1 (envelope-from ) for ; Wed, 21 Feb 2024 00:47:44 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 8IXxFSA61WUwcAEA62LTzQ (envelope-from ) for ; Wed, 21 Feb 2024 00:47:44 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=JqR3+wxr; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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=1708472864; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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:dkim-signature; bh=GALehFfNqtBmG/nIKL36LEcHUIGPNCuYHDrDojjuK94=; b=VvvYqqkun7jUxyYkivCqHKHGpXjxnYb4ce6FerW/XaoBevZ/CCsxmKYDAzi8fssFHdOTg5 ydRGyq8fXq7mHVlESScaty+GLsH1DQGJX5j0KOadANOA/TQNWqcdeR7qsoD+k+X5HLl5Rx 7VQJ22MC914tDpFZeMOzXSUWToUoaEBPZJfr+MnFmD1GG3x4/2dJ84o0p7DyfJkEJZ+fce RA02EYMlNLbPghVUIPfadbMqT3pymOd3t/YLCVFNaY/Y4EleWhKrxfZ6LnwCINYvsIENHU 9YXsDHDz8Ai9jCy6evpiV85SqqKPopwvpLOlIpG/kKhNDIbxZA8VzYTmFkDecQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=JqR3+wxr; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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=1708472864; a=rsa-sha256; cv=none; b=ptQfyHJnAvv+YUGraxSZMYPrtA7WZvp7i5hqk3ao3k1R1nRRy7Yw5jCzuILaLF5XIA3RsL oPH3Qto7xXPXg3eEQN7l7IaqZ5XHWBNfIAe1Q7PJ6kxvV9pS+lBGHqHdBp45UPEU9JLCXB G7fzKAkGDyz/y2HypPxMD0uuAS9BMHJ88eAtO8nufVSyIzZc1+KUO/wG4CJo6MM2HGx05l EekPGdqPXEc1XJ6WOuacfAdaveJQbD+UqxTpDI807lukEydjBHSQtrK8aebFCFVHn8S8wr VFr/wE/MrYxk3dYR1BN91OeSAOXB5l6Bkxfo20YjF6jFOB3NkFJIoY5Il4kcEw== 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 216C916546 for ; Wed, 21 Feb 2024 00:47:44 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcZpu-0001Ui-RD; Tue, 20 Feb 2024 18:47:42 -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 1rcZpt-0001SX-Hx for guix-patches@gnu.org; Tue, 20 Feb 2024 18:47:41 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rcZpt-0000lF-8a for guix-patches@gnu.org; Tue, 20 Feb 2024 18:47:41 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rcZqF-0000k1-5W; Tue, 20 Feb 2024 18:48:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69295] [PATCH 11/46] gnu: python-astropy: Improve packages style. Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: andreas@enge.fr, bavier@posteo.net, sharlatanus@gmail.com, guix-patches@gnu.org Resent-Date: Tue, 20 Feb 2024 23:48:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69295 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69295@debbugs.gnu.org Cc: Sharlatan Hellseher , Andreas Enge , Eric Bavier , Sharlatan Hellseher X-Debbugs-Original-Xcc: Andreas Enge , Eric Bavier , Sharlatan Hellseher Received: via spool by 69295-submit@debbugs.gnu.org id=B69295.17084728402754 (code B ref 69295); Tue, 20 Feb 2024 23:48:03 +0000 Received: (at 69295) by debbugs.gnu.org; 20 Feb 2024 23:47:20 +0000 Received: from localhost ([127.0.0.1]:47318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcZpX-0000iF-IC for submit@debbugs.gnu.org; Tue, 20 Feb 2024 18:47:20 -0500 Received: from mail-wm1-f50.google.com ([209.85.128.50]:54744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcZoU-0000Yw-8b for 69295@debbugs.gnu.org; Tue, 20 Feb 2024 18:46:14 -0500 Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-40fd72f7125so35855e9.1 for <69295@debbugs.gnu.org>; Tue, 20 Feb 2024 15:45:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708472646; x=1709077446; darn=debbugs.gnu.org; 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=GALehFfNqtBmG/nIKL36LEcHUIGPNCuYHDrDojjuK94=; b=JqR3+wxrqyKRm8OIHrtLKeQUsqki63OAd0T16/VNve7v7CDkBoasyy/ul8oPmeL+I4 LOVVqyLxSJ0H/nO/0WqAleefwerZQB8o0/DFn0SKAV7QiIcbBBbwJ2nrIcWoqG4X7W4G QnbsUaJjt44GlncM9kt1WpnyVvd2oMqewufvYTinlxChiRASpOPZDT0epUah62pJhcad 5p1IpeBDuorQ/kiCqdX35adiO9MFQ0g7fOzBImV/BV2mf2fGEVeT/zmCOYPIL4pLoTDv F4Xw6y/7NI+0C5vFAFOA54ioZVS298q3o1sm/cidlLEJ91AfExonVuzH+aP9nlsRjtZ2 72LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708472646; x=1709077446; 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=GALehFfNqtBmG/nIKL36LEcHUIGPNCuYHDrDojjuK94=; b=SjyadUoU3GlEkRCqilm5ylueZNUQJ+VHSMGQRwXJIYl8Hp5Tgf308x8jfkSIs30jB4 8KE+d/Ipvc77IVnfVvMrx0xSpkYIXKUY4cp8y0Mlj5qPk2W+SnXZjUqJC8bMBmKmC/N+ QSgpZ96eKgxXsR/f9AVmXudvCOhMFba2zgkRga1bNfIi6Ixg15jwmiUIyYEetQhURvnj 4xWCw/s55VE0uFdFWiK3pomyTQVqJQgIOySem49MaMBKsKhgsqqCl69l2N1QTnCtmD+2 7gSpkgaPAa25rTirxn56IFY+LMHf7HaS2AyHc4xK+M3TQJuR1WqZIpwUBA7vqNoor6p5 bH3g== X-Gm-Message-State: AOJu0YzVYVkejWE/AzTf1XVevoLBnIXCqMMDYaTUJpgyqEUweBkbEota 2nzdfTUT6myL7AdQvz0okYr9Nzx0taKnsk2mdx8DFw+kYj8sb8efx99Sy+51Mc5oLw== X-Google-Smtp-Source: AGHT+IGuUHEB+9EBWNGAF/V51X+k35EDyeQMta2OzeB1f+gSWM06iBlO+roG6ipru/4ELQjf67zjOg== X-Received: by 2002:a05:600c:4fd5:b0:411:b834:9c79 with SMTP id o21-20020a05600c4fd500b00411b8349c79mr12859460wmq.13.1708472645750; Tue, 20 Feb 2024 15:44:05 -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 n22-20020a05600c4f9600b00411a6ce0f99sm16347385wmq.24.2024.02.20.15.44.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 15:44:05 -0800 (PST) From: Sharlatan Hellseher Date: Tue, 20 Feb 2024 23:43:09 +0000 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 4.02 X-Spam-Score: 4.02 X-Migadu-Queue-Id: 216C916546 X-Migadu-Scanner: mx13.migadu.com X-TUID: iAMRoAIWU3Sk * gnu/packages/astronomy.scm (python-astropy): Adjust package style. [arguments] <#:phases>: {preparations} Simplify it, move step setting up HOME env to 'prepare-test-environment phase. {prepare-test-environment}: New phase, consolidating all pre test procedures. {check}: Add option to run test in parallel to accelerate them. Remove from disabled list tests which were passed successfully. Change-Id: I306ab60b6e155c81035de9584fbd9d06a6381045 --- gnu/packages/astronomy.scm | 86 ++++++++++++++++++++------------------ 1 file changed, 46 insertions(+), 40 deletions(-) diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index 11cdd9e862..9db5b080cc 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -1499,46 +1499,52 @@ (define-public python-astropy (for-each delete-file-recursively '("expat" "wcslib"))))))) (build-system python-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'preparations - (lambda _ - ;; Use our own libraries in place of bundles. - (setenv "ASTROPY_USE_SYSTEM_ALL" "1") - ;; Some tests require a writable home. - (setenv "HOME" "/tmp") - ;; Relax xfail tests. - (substitute* "pyproject.toml" - (("xfail_strict = true") "xfail_strict = false")) - ;; Replace reference to external ply. - (substitute* "astropy/utils/parsing.py" - (("astropy.extern.ply") "ply")) - ;; Replace reference to external configobj. - (with-directory-excursion "astropy/config" - (substitute* "configuration.py" - (("from astropy.extern.configobj ") ""))))) - ;; This file is opened in both install and check phases. - (add-before 'install 'writable-compiler - (lambda _ (make-file-writable "astropy/_compiler.c"))) - (add-before 'check 'writable-compiler - (lambda _ (make-file-writable "astropy/_compiler.c"))) - (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (when tests? - (add-installed-pythonpath inputs outputs) - ;; Extensions have to be rebuilt before running the tests. - (invoke "python" "setup.py" "build_ext" "--inplace") - (invoke "python" "-m" "pytest" "--pyargs" "astropy" - ;; Skip tests that need remote data. - "-k" (string-append - "not remote_data" - ;; XXX: Check why this tests failing. - " and not test_ignore_sigint" - " and not test_parquet_filter" - ;; See https://github.com/astropy/astropy/issues/15537 - " and not test_pvstar" - ;; E ModuleNotFoundError: No module named 'wofz' - " and not test_pickle_functional")))))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'preparations + (lambda _ + ;; Use our own libraries in place of bundles. + (setenv "ASTROPY_USE_SYSTEM_ALL" "1") + ;; Relax xfail tests. + (substitute* "pyproject.toml" + (("xfail_strict = true") "xfail_strict = false")) + ;; Replace reference to external ply. + (substitute* "astropy/utils/parsing.py" + (("astropy.extern.ply") "ply")) + ;; Replace reference to external configobj. + (substitute* "astropy/config/configuration.py" + (("from astropy.extern.configobj ") "")))) + ;; This file is opened in both install and check phases. + (add-before 'install 'writable-compiler + (lambda _ + (make-file-writable "astropy/_compiler.c"))) + (add-before 'check 'prepare-test-environment + (lambda _ + ;; Some tests require a writable home. + (setenv "HOME" "/tmp") + (make-file-writable "astropy/_compiler.c") + ;; Extensions have to be rebuilt before running the tests. + (invoke "python" "setup.py" "build_ext" "--inplace" + "-j" (number->string (parallel-job-count))))) + ;; TODO: The swap to pyproject-build-system introduced all tests + ;; failed due to pytest could not load conftest.py, find out how + ;; to resolve it and migrate completely to pyproject-build-system. + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python" "-m" "pytest" "--pyargs" "astropy" + ;; with -n : 133.00s + ;; without -n : 326.14s + "-n" (number->string (parallel-job-count)) + "-k" (string-append + ;; Skip tests that need remote data. + "not remote_data" + ;; E astropy.samp.errors.SAMPProxyError: + ;; + " and not test_main" + ;; E ModuleNotFoundError: No module named 'wofz' + " and not test_pickle_functional")))))))) (native-inputs (list pkg-config python-colorlog -- 2.41.0