From 39eecca8b5577dd162f03bb6b2368953ba6132c4 Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Sun, 24 Aug 2025 18:51:15 +0200 Subject: [PATCH] gnu: python-pyperf: Switch to pyproject. * gnu/packages/python-xyz.scm (python-pyperf): [build-system]: Switch to pyproject-build-system. [arguments]<#:test-flags>: Set them to replace... <#:phases>:... these. [native-inputs]: Add python-pytest, python-setuptools, python-wheel. [description]: Run guix style. Signed-off-by: jgart --- gnu/packages/python-xyz.scm | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index b90e909b2db48cd3cef9c67faf1cfa1463945071..c792280d6d6d141a54831ed957ccc3efeebb255d 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -38361,32 +38361,18 @@ easy to write code that's correct across platforms and Pythons.") (uri (pypi-uri "pyperf" version)) (sha256 (base32 "189qf9wdbig0fk4n3bavx8acgdbay5lllfvw48jvbfaafb7y5hja")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-tests - (lambda _ - ;; Some of these tests fail with: - ;; - ;; ModuleNotFoundError: No module named 'pyperf' - ;; - ;; even when calling ‘add-installed-pythonpath’ in the ‘check’ - ;; phase. - (delete-file "pyperf/tests/test_examples.py"))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - ;; From tox.ini's ‘testenv.commands’. - (invoke "python" "-bb" "-Wd" - "-m" "unittest" "discover" - "-s" "pyperf/tests/" "-v"))))))) - (native-inputs - (list python-psutil)) + (list + #:test-flags + #~(list "--ignore=pyperf/tests/test_examples.py"))) + (native-inputs (list python-psutil python-pytest python-setuptools + python-wheel)) (home-page "https://github.com/psf/pyperf") (synopsis "Toolkit for running Python benchmarks") - (description "The Python @code{pyperf} module is a toolkit for writing, -running and analyzing benchmarks. It features a simple API that can: + (description + "The Python @code{pyperf} module is a toolkit for writing, running and +analyzing benchmarks. It features a simple API that can: @itemize @item automatically calibrate a benchmark for a time budget;