From patchwork Wed Jul 26 23:15:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sharlatan Hellseher X-Patchwork-Id: 52210 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 F1E4B27BBEA; Thu, 27 Jul 2023 00:34:39 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, 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 10EB827BBE2 for ; Thu, 27 Jul 2023 00:34:39 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOnkf-0002ko-OV; Wed, 26 Jul 2023 19:17: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 1qOnkc-0002kT-Qh for guix-patches@gnu.org; Wed, 26 Jul 2023 19:17:02 -0400 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 1qOnkc-0001DJ-Il for guix-patches@gnu.org; Wed, 26 Jul 2023 19:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qOnkc-00041u-BM; Wed, 26 Jul 2023 19:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64201] [PATCH v2 03/22] gnu: python-photutils: Update package style. Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: andreas@enge.fr, efraim@flashner.co.il, bavier@posteo.net, guix-patches@gnu.org Resent-Date: Wed, 26 Jul 2023 23:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64201 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64201@debbugs.gnu.org Cc: Sharlatan Hellseher , Andreas Enge , Efraim Flashner , Eric Bavier X-Debbugs-Original-Xcc: Andreas Enge , Efraim Flashner , Eric Bavier Received: via spool by 64201-submit@debbugs.gnu.org id=B64201.169041336915270 (code B ref 64201); Wed, 26 Jul 2023 23:17:02 +0000 Received: (at 64201) by debbugs.gnu.org; 26 Jul 2023 23:16:09 +0000 Received: from localhost ([127.0.0.1]:40199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOnjk-0003y2-MO for submit@debbugs.gnu.org; Wed, 26 Jul 2023 19:16:09 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:46420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOnja-0003um-NX for 64201@debbugs.gnu.org; Wed, 26 Jul 2023 19:15:59 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-316feb137a7so335398f8f.1 for <64201@debbugs.gnu.org>; Wed, 26 Jul 2023 16:15:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690413353; x=1691018153; 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=esbxFUmmttafLtgOTf0YJv5htAFrQbxo5V+29aBK9Us=; b=kJugqcTCTXnIGr3H4VR3oxW4PsE5XWiSdlVq4tWc9DAmNds5tX0QAEGJB7dh1it2X4 O3SFWXH6sficnbd4sZNLsmLN/oSbWJxuL8Zx/sojQ5QOc9CdcKu5aVJr5tUeufoBv56G YqMovmQBWjuIOKy8z0HLI+JBV7cEDR8BYVZsnQnDChlddamI3UWvxG02r2gyH6GUTMQ/ j+VPQQLoH3eVQVYlzvwdgfzojNxe7UFV2tzrsidDJpFhdxYYRmb598X2UzScw9PlOjpW iMcaVXNa7DnsQTquy05Z+A1jl5XSewBiBUz4/Xs9uYV+pEs/Hc8UR2meXXRb8mZf/LTl SFjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690413353; x=1691018153; 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=esbxFUmmttafLtgOTf0YJv5htAFrQbxo5V+29aBK9Us=; b=g+/wekjDk3iKe74fAzW7xY13N3/JLdko9Qp2uYVHBT8Biyg/8jhIPe/Q6aqcSoFhEO n46CSVLl1n6f7R+MGHo33u8GZvxSZhyZaDxSbnPJbS9gaL17ZKt8v8Y0WB+RCX1rQlnM ye0w8KodS59a5Ls9k7wumrriQn1d3lOt596i6uzrsZy9A0X9VJlo0nyYtz5jvD7sGQ4d tVOXUejAho/ajsrYynSaijGlc8pl/30m60qzIrKsqDUIUHeW4uAAIe74FCWlpkIX08Jg C2NDr3ixNmcGYcxXPqxLhFPWb5gXl3RsKktCDxb8SdMk3P5xecuAhDEGWUveij+dkn3N W42A== X-Gm-Message-State: ABy/qLaGxkw/Hwac8jgLQgdS3RvqubT30tPS5k0ctkTI08+f18k+DrFT cnMZvcnnVZhhzeMECnslFGTGp3Av9nmfKQ== X-Google-Smtp-Source: APBJJlHt1oS6NJRaHN5m60tVfyItbZlBMcGFX9Y9c2HpXh6GxXgwuCERzAodCwEOd1ZCejA8DhkkRg== X-Received: by 2002:a5d:4c4b:0:b0:317:7c31:f3a7 with SMTP id n11-20020a5d4c4b000000b003177c31f3a7mr435278wrt.17.1690413352787; Wed, 26 Jul 2023 16:15:52 -0700 (PDT) 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 u20-20020a05600c00d400b003faef96ee78sm3147472wmm.33.2023.07.26.16.15.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 16:15:52 -0700 (PDT) From: Sharlatan Hellseher Date: Thu, 27 Jul 2023 00:15:29 +0100 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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/astronomy.scm (python-photutils): Update package style. [build-system]: Swap to python-build-system. [arguments]: Use G-expressions. Rename the phase before check 'writable-compiler to 'build-extensions to reflect it's purpose, add new step in phase building extensions for testing. [native-inputs]: Remove python-pytest-runner. --- gnu/packages/astronomy.scm | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index 26d4e9621d..15a52e0744 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -1833,23 +1833,29 @@ (define-public python-photutils (uri (pypi-uri "photutils" version)) (sha256 (base32 "1bq4ma402lpa5d6l85awlc23kasxf40nq8hgi3iyrilnfikan0jz")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - `(#:test-target "pytest" - #:phases - (modify-phases %standard-phases - ;; This file is opened in both install and check phases. - (add-before 'install 'writable-compiler - (lambda _ (make-file-writable "photutils/_compiler.c"))) - (add-before 'check 'writable-compiler - (lambda _ (make-file-writable "photutils/_compiler.c")))))) + (list + #:phases + #~(modify-phases %standard-phases + ;; This file is opened in both install and check phases. + (add-before 'install 'writable-compiler + (lambda _ (make-file-writable "photutils/_compiler.c"))) + (add-before 'check 'build-extensions + (lambda _ + ;; Cython extensions have to be built before running + ;; the tests. If it's not build it fails with error: + ;; + ;; ModuleNotFoundError: No module named + ;; 'photutils.geometry.circular_overlap' + (make-file-writable "photutils/_compiler.c") + (invoke "python" "setup.py" "build_ext" "--inplace")))))) (propagated-inputs (list python-astropy python-numpy)) (native-inputs (list python-cython python-extension-helpers python-pytest-astropy - python-pytest-runner python-setuptools-scm)) (home-page "https://github.com/astropy/photutils") (synopsis "Source detection and photometry")