me
/
guix
Archived
1
0
Fork 0

gnu: python-regions: Update to 0.9.

* gnu/packages/astronomy.scm (python-regions): Update to 0.9.
[arguments] <#:phases>: Add 'create-setup.py phase, rename
'prepare-test-environment to 'build-extensions to reflect purpose.
[native-inputs]: Remove python-cython; add python-cython-3.

Change-Id: Ia634f93336eb7658c4eaeeb7ddb6539c2e0adee3
master
Sharlatan Hellseher 2024-04-17 22:24:02 +01:00
parent 48895affab
commit f9bb983d3e
No known key found for this signature in database
GPG Key ID: 76D727BFF62CD2B5
1 changed files with 14 additions and 7 deletions

View File

@ -2667,13 +2667,13 @@ Virtual observatory (VO) using Python.")
(define-public python-regions (define-public python-regions
(package (package
(name "python-regions") (name "python-regions")
(version "0.8") (version "0.9")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (pypi-uri "regions" version)) (uri (pypi-uri "regions" version))
(sha256 (sha256
(base32 "09401pz7926zlci7cznd78hmv9947f6jxyy2afqdqc1xaccpzcq2")))) (base32 "0kvfdzqry3vcvphd7ldmppbgn3ab97hbfzwxfrlxls92yi41h3i6"))))
(build-system pyproject-build-system) (build-system pyproject-build-system)
(arguments (arguments
(list (list
@ -2681,14 +2681,21 @@ Virtual observatory (VO) using Python.")
#~(list "-n" "auto") #~(list "-n" "auto")
#:phases #:phases
#~(modify-phases %standard-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. ;; This file is opened in both install and check phases.
;; XXX: Check if it is still required.
(add-before 'install 'writable-compiler (add-before 'install 'writable-compiler
(lambda _ (make-file-writable "regions/_compiler.c"))) (lambda _ (make-file-writable "regions/_compiler.c")))
(add-before 'check 'prepare-test-environment (add-before 'check 'build-extensions
(lambda _ (lambda _
(setenv "HOME" "/tmp")
(make-file-writable "regions/_compiler.c")
(invoke "python" "setup.py" "build_ext" "--inplace")))))) (invoke "python" "setup.py" "build_ext" "--inplace"))))))
(propagated-inputs (propagated-inputs
(list python-astropy (list python-astropy
@ -2698,7 +2705,7 @@ Virtual observatory (VO) using Python.")
python-scipy python-scipy
python-shapely)) python-shapely))
(native-inputs (native-inputs
(list python-cython (list python-cython-3
python-extension-helpers python-extension-helpers
python-pytest-arraydiff python-pytest-arraydiff
python-pytest-astropy python-pytest-astropy