From a7d7a1ec0b56f985c22b80056040a5e2ec012a80 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Tue, 11 Feb 2025 12:04:46 +0000 Subject: [PATCH] gnu: python-regions: Simplify package. * gnu/packages/astronomy.scm (python-regions) [arguments] : Remove 'create-setup.py, 'writable-compiler and build-extensions. Use custom 'check. Change-Id: I75ff85cc115e41eb7affd86c10eeea363ded3882 --- gnu/packages/astronomy.scm | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index 5eb98834642e42090ad23afeb6692b52c47974d7..b1a342692bde83fc94e20056c5ad20ede19a5b20 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -4743,22 +4743,10 @@ Virtual observatory (VO) using Python.") #~(list "--numprocesses" (number->string (parallel-job-count))) #:phases #~(modify-phases %standard-phases - ;; setup.py was removed in 84c80a280431adda00641cda5264c7de18b43b2f - ;; for some unknown reason, which caused the package to fail to - ;; build. It is being recreated based on that commit. - (add-after 'unpack 'create-setup.py - (lambda _ - (call-with-output-file "setup.py" - (lambda (port) - (format port "from setuptools import setup -from extension_helpers import get_extensions -setup(ext_modules=get_extensions())"))))) - ;; This file is opened in both install and check phases. - (add-before 'install 'writable-compiler - (lambda _ (make-file-writable "regions/_compiler.c"))) - (add-before 'check 'build-extensions - (lambda _ - (invoke "python" "setup.py" "build_ext" "--inplace")))))) + (replace 'check + (lambda* (#:key tests? test-flags #:allow-other-keys) + (with-directory-excursion #$output + (apply invoke "pytest" "-vv" test-flags))))))) (propagated-inputs (list python-astropy python-h5py