From patchwork Sat Jul 20 22:40:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sharlatan Hellseher X-Patchwork-Id: 29459 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 D08BF27BBE2; Sat, 20 Jul 2024 23:44:55 +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 7340927BBE9 for ; Sat, 20 Jul 2024 23:44:53 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVInR-0004jh-Nk; Sat, 20 Jul 2024 18:43:21 -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 1sVInL-0004ZX-8s for guix-patches@gnu.org; Sat, 20 Jul 2024 18:43:15 -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 1sVInK-0004N7-Tu; Sat, 20 Jul 2024 18:43:15 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sVInH-0001mh-CC; Sat, 20 Jul 2024 18:43:11 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72219] [PATCH 16/34] gnu: python-extension-helpers: Enable tests. Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, marius@gnu.org, me@bonfacemunyoki.com, sharlatanus@gmail.com, tanguy@bioneland.org, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Sat, 20 Jul 2024 22:43:11 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72219 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72219@debbugs.gnu.org Cc: Sharlatan Hellseher , Lars-Dominik Braun , Marius Bakke , Munyoki Kilyungi , Sharlatan Hellseher , Tanguy Le Carrour , jgart X-Debbugs-Original-Xcc: Lars-Dominik Braun , Marius Bakke , Munyoki Kilyungi , Sharlatan Hellseher , Tanguy Le Carrour , jgart Received: via spool by 72219-submit@debbugs.gnu.org id=B72219.17215153686543 (code B ref 72219); Sat, 20 Jul 2024 22:43:11 +0000 Received: (at 72219) by debbugs.gnu.org; 20 Jul 2024 22:42:48 +0000 Received: from localhost ([127.0.0.1]:54100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sVImt-0001hN-Rj for submit@debbugs.gnu.org; Sat, 20 Jul 2024 18:42:48 -0400 Received: from mail-wr1-f43.google.com ([209.85.221.43]:48485) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sVImX-0001ce-Hb for 72219@debbugs.gnu.org; Sat, 20 Jul 2024 18:42:26 -0400 Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-3685a5e7d3cso1482894f8f.1 for <72219@debbugs.gnu.org>; Sat, 20 Jul 2024 15:42:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721515279; x=1722120079; 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=iKkx/BikFVK8GqA+Y23I+v/M5Gmu6+3Kz1EyUNFiZdg=; b=YvkkletB62r+ncuZ5M7qMlThD9h+aYE0QxsMPDfkl/r7RkN6G2cO4+RCwcarqaDzPC AM5ZIIyEAXvUjZcIdakBPtVyDqtYABx8vajWm74UDlqKDVQ7BHzpAgRS9R/bKpkY7+i0 yE5sipWhOCRMK4hxcdlnlpm1DmihrHpmJUV/y1ek4earG1hw0R2DuzhdyR8joDEzmgw1 TSYW6Ln0ynl79HdQS9MR8Ck9vH6yZKQQxhSkJLYD1W9AdNcWfEJUeVBQ2xBUeiakDhUM +NcXC4xPskU1DM8Yu6RQEr/PIEfyO66t3CEowZ+slEBA7jbNUJp/Cw8e+LqFJ/A0CDlP LveQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721515279; x=1722120079; 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=iKkx/BikFVK8GqA+Y23I+v/M5Gmu6+3Kz1EyUNFiZdg=; b=WGRCBzP0tYEgWdkmOQ4aLsn9VPRXqAl7YsLRyZlZgRIiQaXObm9EvJfx50LMV5JDV1 zvP3koxaluHRWgcWU9DL1kXLZVtqKxvVl0rpLFvckLgjLFd5bIUn/NXqRyVYNyY/SMWQ uQxGvaMYGCZYKOA9s3M1QgbXwHmGDccnPrvgfUoMBV3Gn17CeoK/hNYRGmW0e8DQVUZI 3vnImMLv7h1Q7I8J2nR3tFKSfd5aHpidsuEWrPfI76K4gjI/ljzen2cuUG4y4KgeeNjy PY7QOyaofb+scEj01lU9oXLHMxb+Lh6p9SY5VcenzrcWoQg7hZixA9R/aXMIj50K6TwV 78QQ== X-Gm-Message-State: AOJu0YxpKL6IZHtocz0YOZtdR569gCMoXJ/aKqW99kRd/UELSBnPQJy2 zjkBo/snYSZCUo5vvEzOlaaR2OXalDVgrHgSC1hejIV+dIMFIDDcR73vo3ro X-Google-Smtp-Source: AGHT+IEB5lu82S0/kiwdyDvK9AJLE/PbfkBn5QhtqKucnj0w3QAfr67uA89MBwH60pjxJrzFB6I1DA== X-Received: by 2002:a05:6000:243:b0:366:e2e5:c323 with SMTP id ffacd0b85a97d-369bae63a2amr1354480f8f.19.1721515278964; Sat, 20 Jul 2024 15:41:18 -0700 (PDT) Received: from guxtil.incerto.xyz (bagu-15-b2-v4wan-170076-cust245.vm21.cable.virginm.net. [77.98.0.246]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-368787cec6bsm4690294f8f.71.2024.07.20.15.41.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jul 2024 15:41:18 -0700 (PDT) From: Sharlatan Hellseher Date: Sat, 20 Jul 2024 23:40:39 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 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/python-xyz.scm (python-extension-helpers): Adjust indentation. [source]: Swap to git checkout which contains tests. [arguments]: <#:tests-flags>: Disable one failing tests. <#:phases>: Add 'set-version phase. Use custom 'check phase. [native-inputs]: Remove python-coverage. Add python-tomli. Change-Id: I8a04811e43bc0f1c2e0761aca87c4888a1444fc1 --- gnu/packages/python-xyz.scm | 66 +++++++++++++++++++++++-------------- 1 file changed, 42 insertions(+), 24 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 036bda6262..7ef8488bfc 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -5045,33 +5045,51 @@ (define-public python-exceptiongroup (license license:expat))) (define-public python-extension-helpers -(package - (name "python-extension-helpers") - (version "1.1.1") - (source - (origin - (method url-fetch) - (uri (pypi-uri "extension-helpers" version)) - (sha256 - (base32 "001zd6gfs9yrwjny1fxzycxx0kcasshlyl6rh1kgzm13ll2d6pgr")))) - (build-system pyproject-build-system) - ;; FIXME: pytest failed to load test suit, find out why. - ;; - _pytest.pathlib.ImportPathMismatchError: ('extension_helpers.conftes - (arguments (list #:tests? #f)) - (native-inputs - (list python-coverage - python-pytest - python-pytest-astropy - python-pytest-cov - python-setuptools-scm)) - (home-page "https://extension-helpers.readthedocs.io") - (synopsis "Astropy ecosystem utilities for building and installing packages") - (description - "The extension-helpers package includes convenience helpers to assist with + (package + (name "python-extension-helpers") + (version "1.1.1") + (source + (origin + (method git-fetch) ; no tests in the PyPI tarball + (uri (git-reference + (url "https://github.com/astropy/extension-helpers") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1lkhypg21ydx03z03dppbf05zff40dyl0kn6nichzfdfpqnr5055")))) + (build-system pyproject-build-system) + (arguments + (list + ;; It tries to install it via pip: E ModuleNotFoundError: No module named + ;; 'helpers_test_package_fd9cc3a9_11fa_4a1a_b80e_c5b043949604' + #:test-flags #~(list "-k" "not test_only_pyproject[True]") + #:phases + #~(modify-phases %standard-phases + ;; LookupError: setuptools-scm was unable to detect version for + ;; /tmp/guix-build-python-extension-helpers-1.1.1.drv-0/source. + (add-before 'build 'set-version + (lambda _ + (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))) + (replace 'check + (lambda* (#:key tests? test-flags #:allow-other-keys) + (when tests? + (setenv "HOME" "/tmp") + (with-directory-excursion "/tmp" + (apply invoke "pytest" "-v" test-flags)))))))) + (native-inputs + (list python-pytest + python-pytest-astropy + python-pytest-cov + python-setuptools-scm + python-tomli)) + (home-page "https://extension-helpers.readthedocs.io") + (synopsis "Astropy ecosystem utilities for building and installing packages") + (description + "The extension-helpers package includes convenience helpers to assist with building Python packages with compiled C/Cython extensions. It is developed by the Astropy project but is intended to be general and usable by any Python package.") - (license license:bsd-3))) + (license license:bsd-3))) (define-public python-extras (package