From be70ce67532c8b5c14bebdf3a4c0ce483bc86530 Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Sat, 22 May 2021 15:09:37 -0300 Subject: [PATCH 6/6] gnu: python-astropy: Unbundle ply and configobj. * gnu/packages/astronomy.scm (python-astropy)[arguments]: Replace references to external ply and configobj and delete the bundles. [propagated-inputs]: Add python-ply, python-configobj. --- gnu/packages/astronomy.scm | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index d9785696bb..17617eef9b 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -583,7 +583,25 @@ accurately in real time at any rate desired.") (setenv "HOME" "/tmp") ;; Relax xfail tests. (substitute* "setup.cfg" - (("xfail_strict = true") "xfail_strict = false")))) + (("xfail_strict = true") "xfail_strict = false")) + ;; Delete ply and configobj because we have them. They are not + ;; covered by ASTROPY_USE_SYSTEM_ALL. + (with-directory-excursion "astropy/extern" + (for-each delete-file-recursively '("ply" "configobj"))) + ;; Replace all references to external ply. + (let ((ply-files '("coordinates/angle_utilities.py" + "units/format/cds.py" + "units/format/ogip.py" + "units/format/generic.py"))) + (with-directory-excursion "astropy" + (map (lambda (file) + (substitute* file (("astropy.extern.ply") + "ply"))) + ply-files))) + ;; Replace reference to external configobj. + (with-directory-excursion "astropy/config" + (substitute* "configuration.py" + (("from astropy.extern.configobj ") ""))) )) ;; This file is opened in both install and check phases. (add-before 'install 'writable-compiler (lambda _ (make-file-writable "astropy/_compiler.c"))) @@ -617,7 +635,9 @@ accurately in real time at any rate desired.") ;; accepts. Version 7.5 will not be validated in the build. ("wcslib" ,wcslib-7.3))) (propagated-inputs - `(("python-numpy" ,python-numpy) + `(("python-configobj" ,python-configobj) + ("python-numpy" ,python-numpy) + ("python-ply" ,python-ply) ("python-pyerfa" ,python-pyerfa))) (home-page "https://www.astropy.org/") (synopsis "Core package for Astronomy in Python") -- 2.31.1