diff mbox series

[bug#71702,21/30] gnu: python-jwst: Replace reference to external configobj.

Message ID 073a637c6db0a696d876bcc838372c91a724878b.1718966788.git.sharlatanus@gmail.com
State New
Headers show
Series Astronomy update 2024/06 | expand

Commit Message

Sharlatan Hellseher June 21, 2024, 6:38 p.m. UTC
* gnu/packages/astronomy.scm (python-jwst) [source]: Replace reference
to external configobj.

Change-Id: Id539446c16a16c5ff86f1518cbc0080bdefc85b5
---
 gnu/packages/astronomy.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 394b043596..9bdc19a17e 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -4047,7 +4047,16 @@  (define-public python-jwst
               (uri (pypi-uri "jwst" version))
               (sha256
                (base32
-                "0knl2x0z3djsln8mi3a4bkxjz49iwmnr1v6wwsk13zvpkfq21vv4"))))
+                "0knl2x0z3djsln8mi3a4bkxjz49iwmnr1v6wwsk13zvpkfq21vv4"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  ;; Replace reference to external configobj.
+                  (substitute* (find-files "." "\\.py$")
+                    (("from astropy.extern import configobj") "import configobj")
+                    (("from astropy.extern.configobj import validate") "import validate")
+                    (("from astropy.extern.configobj.configobj import ") "from configobj import ")
+                    (("from astropy.extern.configobj.validate import ") "from validate import "))))))
     (build-system pyproject-build-system)
     (arguments
      (list