[PATCH 0/6] gnu: python-astropy: Unbundle WCSLIB.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Sharlatan Hellseher
Severity
normal
S
S
Sharlatan Hellseher wrote on 11 Dec 2022 23:23
(address . guix-patches@gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20221211222330.32212-1-sharlatanus@gmail.com
Hi Guix!

This patch series include update of CFITSIO to the latest version which resolve
build faileur on aarch64-linux system reported in
https://issues.guix.gnu.org/59323with open upstream issue

CFITSIO is configured with curl support which passed build of WCSLIB
(mentioned as failing before in comments).

PYTHON-ASTROPY has WCSLIB unbundled and passed build.

Rest changes include update child packages to the latest version and making
sure they are pass build on x86_64 and aarch64 systems.

Sharlatan Hellseher (6):
gnu: cfitsio: Update to 4.2.0.
gnu: cfitsio: Build with bzip2 support.
gnu: python-fitsio: Update to 1.1.8.
gnu: wcslib: Update to 7.12.
gnu: python-astropy: Update to 5.1.1.
gnu: indi: Update to 1.9.9.

gnu/packages/astronomy.scm | 112 +++++++++++++++++++------------------
1 file changed, 59 insertions(+), 53 deletions(-)


base-commit: c8316c1e47ce2ace5474cbcda03555cf915b4fce
--
2.38.1
S
S
Sharlatan Hellseher wrote on 11 Dec 2022 23:25
[PATCH 1/6] gnu: cfitsio: Update to 4.2.0.
(address . 59978@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20221211222545.32318-1-sharlatanus@gmail.com
Fix build on aarch64-linux as reported in:

The latest version passed build on aarch64-linux system with curl and
gfortran enabled. wcslib@7.5 passed build with curl enabled (was marked
as failing in cements).

* gnu/packages/astronomy.scm (cfitsio): Update to 4.2.0.
[arguments]: Use Gexp, enable tests.
[arguments](phases): Delete check and add post-install-check phases.
[native-inputs]: Add gfortran.
[inputs]: Add curl, zlib.
---
gnu/packages/astronomy.scm | 33 +++++++++++++++++++++------------
1 file changed, 21 insertions(+), 12 deletions(-)

Toggle diff (62 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index c59f4d02a4..8d9cce5158 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -356,7 +356,7 @@ (define-public casacore
(define-public cfitsio
(package
(name "cfitsio")
- (version "3.49")
+ (version "4.2.0")
(source
(origin
(method url-fetch)
@@ -364,18 +364,27 @@ (define-public cfitsio
"http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/"
"cfitsio-" version ".tar.gz"))
(sha256
- (base32 "1cyl1qksnkl3cq1fzl4dmjvkd6329b57y9iqyv44wjakbh6s4rav"))))
+ (base32 "128qsv2q0f0g714ahlsixiikvvbwxi9bg9q9pcr5cd3f7wdkv9gb"))))
(build-system gnu-build-system)
- ;; XXX Building with curl currently breaks wcslib. It doesn't use
- ;; pkg-config and hence won't link with -lcurl.
(arguments
- `(#:tests? #f ; no tests
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-paths
- (lambda _
- (substitute* "Makefile.in" (("/bin/") ""))
- #t)))))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-paths
+ (lambda _
+ (substitute* "Makefile.in" (("/bin/") ""))))
+ (delete 'check)
+ ;; TODO: Testing steps are sourced from docs/fitsio.pdf, implement
+ ;; the logic in Guile in the future.
+ (add-after 'install 'post-install-check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "make" "testprog")
+ (with-output-to-file "testprog.lis" (lambda _(invoke "./testprog")))
+ (invoke "diff" "-r" "testprog.lis" "testprog.out")
+ (invoke "cmp" "-l" "testprog.fit" "testprog.std")))))))
+ (native-inputs (list gfortran))
+ (inputs (list curl zlib))
(home-page "https://heasarc.gsfc.nasa.gov/fitsio/fitsio.html")
(synopsis "Library for reading and writing FITS files")
(description "CFITSIO provides simple high-level routines for reading and
@@ -384,7 +393,7 @@ (define-public cfitsio
provides many advanced features for manipulating and filtering the information
in FITS files.")
(license (license:non-copyleft "file://License.txt"
- "See License.txt in the distribution."))))
+ "See License.txt in the distribution."))))
(define-public python-fitsio
(package
--
2.38.1
S
S
Sharlatan Hellseher wrote on 11 Dec 2022 23:25
[PATCH 2/6] gnu: cfitsio: Build with bzip2 support.
(address . 59978@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20221211222545.32318-2-sharlatanus@gmail.com
* gnu/packages/astronomy.scm (cfitsio):
[arguments](configure-flags): Add bzip2 option.
[inputs]: Add bzip2.
---
gnu/packages/astronomy.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 8d9cce5158..794e5ca2b9 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -368,6 +368,8 @@ (define-public cfitsio
(build-system gnu-build-system)
(arguments
(list
+ #:configure-flags
+ #~(list (string-append "--with-bzip2=" #$(this-package-input "bzip2")))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-paths
@@ -384,7 +386,7 @@ (define-public cfitsio
(invoke "diff" "-r" "testprog.lis" "testprog.out")
(invoke "cmp" "-l" "testprog.fit" "testprog.std")))))))
(native-inputs (list gfortran))
- (inputs (list curl zlib))
+ (inputs (list bzip2 curl zlib))
(home-page "https://heasarc.gsfc.nasa.gov/fitsio/fitsio.html")
(synopsis "Library for reading and writing FITS files")
(description "CFITSIO provides simple high-level routines for reading and
--
2.38.1
S
S
Sharlatan Hellseher wrote on 11 Dec 2022 23:25
[PATCH 3/6] gnu: python-fitsio: Update to 1.1.8.
(address . 59978@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20221211222545.32318-3-sharlatanus@gmail.com
* gnu/packages/astronomy.scm (python-fitsio): Update to 1.1.8.
[arguments]{phases}: skip-bzip2-test remove redundant phase as cfitsio
built with bzip2 support.
[inputs]: Add curl-minimal.
---
gnu/packages/astronomy.scm | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)

Toggle diff (38 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 794e5ca2b9..5ce94a1f07 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -400,13 +400,13 @@ (define-public cfitsio
(define-public python-fitsio
(package
(name "python-fitsio")
- (version "1.1.7")
+ (version "1.1.8")
(source
(origin
(method url-fetch)
(uri (pypi-uri "fitsio" version))
(sha256
- (base32 "0q8siijys9kmjnqvyipjgh6hkhf4fwvr1swhsf4if211i9b0m1xy"))
+ (base32 "1y80hgvlkjz1bijfyb2j03853yc1kc63yrf9ab7as31ad2r6kxb1"))
(modules '((guix build utils)))
(snippet
;; Remove the bundled cfitsio
@@ -430,13 +430,8 @@ (define-public python-fitsio
(("self.system_fitsio_libdir = None") "pass")
(("self.use_system_fitsio") "True")
(("self.system_fitsio_includedir") includedir)
- (("self.system_fitsio_libdir") libdir)))))
- (add-after 'unpack 'skip-bzip2-test
- (lambda* (#:key inputs #:allow-other-keys)
- ;; The bzip2 test fails because Guix' cfitsio
- ;; is built without bzip2 support.
- (substitute* "fitsio/test.py"
- (("'SKIP_BZIP_TEST' in os.environ") "True")))))))
+ (("self.system_fitsio_libdir") libdir))))))))
+ (inputs (list curl-minimal))
(propagated-inputs
(list python-numpy cfitsio))
(home-page "https://github.com/esheldon/fitsio")
--
2.38.1
S
S
Sharlatan Hellseher wrote on 11 Dec 2022 23:25
[PATCH 4/6] gnu: wcslib: Update to 7.12.
(address . 59978@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20221211222545.32318-4-sharlatanus@gmail.com
* gnu/packages/astronomy.scm (wcslib): Update to 7.12.
[arguments]: Use Gexp, enable parallel tests.
---
gnu/packages/astronomy.scm | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)

Toggle diff (58 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 5ce94a1f07..1876b0cde0 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -525,7 +525,7 @@ (define-public eye
(define-public wcslib
(package
(name "wcslib")
- (version "7.5")
+ (version "7.12")
(source
(origin
(method url-fetch)
@@ -533,26 +533,26 @@ (define-public wcslib
"ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-" version
".tar.bz2"))
(sha256
- (base32 "1536gmcpm6pckn9xrb6j8s4pm1vryjhzvhfaj9wx3jwxcpbdy0dw"))))
+ (base32 "1m3bx6gh5w3c7vvsqcki0x20mg8lilg13m0i8nh7za89w58dxy4w"))))
(inputs
(list cfitsio))
(build-system gnu-build-system)
(arguments
- `(#:configure-flags
- (list (string-append "--with-cfitsiolib="
- (assoc-ref %build-inputs "cfitsio") "/lib")
- (string-append "--with-cfitsioinc="
- (assoc-ref %build-inputs "cfitsio") "/include"))
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'patch-/bin/sh
- (lambda _
- (substitute* "makedefs.in"
- (("/bin/sh") "sh"))
- #t))
- (delete 'install-license-files)) ; installed by ‘make install’
- ;; Parallel execution of the test suite is not supported.
- #:parallel-tests? #f))
+ (list
+ #:configure-flags
+ #~(list (string-append "--with-cfitsiolib="
+ #$(this-package-input "cfitsio") "/lib")
+ (string-append "--with-cfitsioinc="
+ #$(this-package-input "cfitsio") "/include"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'install-license-files) ; installed by ‘make install’
+ (add-before 'configure 'patch-/bin/sh
+ (lambda _
+ (substitute* "makedefs.in"
+ (("/bin/sh") "sh")))))))
+ ;; TODO: Fix build with gfortran and pack missing optional pgplot.
+ ;; (inputs (list gfortran pgplot))
(home-page "https://www.atnf.csiro.au/people/mcalabre/WCS")
(synopsis "Library which implements the FITS WCS standard")
(description "The FITS \"World Coordinate System\" (@dfn{WCS}) standard
--
2.38.1
S
S
Sharlatan Hellseher wrote on 11 Dec 2022 23:25
[PATCH 5/6] gnu: python-astropy: Update to 5.1.1.
(address . 59978@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20221211222545.32318-5-sharlatanus@gmail.com
* gnu/packages/astronomy.scm (python-astropy): Update to 5.1.1.
[source]{snippet}: Unbundle wcslib.
[arguments]{phases}: preparations: Use all system libraries.
[inputs]: Add wcslib.
---
gnu/packages/astronomy.scm | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)

Toggle diff (59 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 1876b0cde0..030ae9b4ea 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -982,25 +982,23 @@ (define-public celestia-gtk
(define-public python-astropy
(package
(name "python-astropy")
- (version "5.1")
+ (version "5.1.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "astropy" version))
(sha256
- (base32 "0zkv3ddzlxx21i796azfbqxrqnsxn83vsczscv577iyzxp3v5c8x"))
+ (base32 "10dxjim60ch4qznqa5s63q936mkvy95p0k26kcwzv43hmybdcjxs"))
(modules '((guix build utils)))
(snippet
'(begin
;; Remove Python bundles.
(with-directory-excursion "astropy/extern"
(for-each delete-file-recursively '("ply" "configobj")))
- ;; Remove cextern bundles and leave the wcslib bundle. Astropy
- ;; upgrades to different versions of wcslib every few releases
- ;; and tests break every upgrade.
- ;; TODO: unbundle wcslib.
+ ;; Remove cextern bundles. Check bundled versions against available
+ ;; in Guix in the future update of astropy.
(with-directory-excursion "cextern"
- (for-each delete-file-recursively '("cfitsio" "expat")))
+ (for-each delete-file-recursively '("cfitsio" "expat" "wcslib")))
#t))))
(build-system python-build-system)
(arguments
@@ -1008,10 +1006,8 @@ (define-public python-astropy
(modify-phases %standard-phases
(add-after 'unpack 'preparations
(lambda _
- ;; Use our own libraries in place of bundles, with the
- ;; exception of wcslib.
- (setenv "ASTROPY_USE_SYSTEM_CFITSIO" "1")
- (setenv "ASTROPY_USE_SYSTEM_EXPAT" "1")
+ ;; Use our own libraries in place of bundles.
+ (setenv "ASTROPY_USE_SYSTEM_ALL" "1")
;; Some tests require a writable home.
(setenv "HOME" "/tmp")
;; Relax xfail tests.
@@ -1058,7 +1054,7 @@ (define-public python-astropy
python-sgp4
python-skyfield))
(inputs
- (list cfitsio expat))
+ (list cfitsio expat wcslib))
(propagated-inputs
(list python-configobj
python-numpy
--
2.38.1
S
S
Sharlatan Hellseher wrote on 11 Dec 2022 23:25
[PATCH 6/6] gnu: indi: Update to 1.9.9.
(address . 59978@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20221211222545.32318-6-sharlatanus@gmail.com
* gnu/packages/astronomy.scm (indi): Update to 1.9.9.
[arguments]{tests}: Silent test on aarch64-linux system.
[inputs]: Add libev.
---
gnu/packages/astronomy.scm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

Toggle diff (46 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 030ae9b4ea..6ddddc358d 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -47,6 +47,7 @@ (define-module (gnu packages astronomy)
#:use-module (gnu packages gtk)
#:use-module (gnu packages image)
#:use-module (gnu packages image-processing)
+ #:use-module (gnu packages libevent)
#:use-module (gnu packages libusb)
#:use-module (gnu packages lua)
#:use-module (gnu packages maths)
@@ -1978,7 +1979,7 @@ (define-public imppg
(define-public indi
(package
(name "indi")
- (version "1.9.3")
+ (version "1.9.9")
(source
(origin
(method git-fetch)
@@ -1987,10 +1988,12 @@ (define-public indi
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0c7md288d3g2vf0m1ai6x2l4j4rmlasc4rya92phvd4ynf8vcki2"))))
+ (base32 "1vfcas59nlw8v7n6qhxhcm4isf5wk0crip5rmsallq3bsv3zznfr"))))
(build-system cmake-build-system)
(arguments
- `(#:configure-flags
+ ;; TODO: fix failing tests on aarch64-system.
+ `(#:tests? ,(not (or (%current-target-system) (target-aarch64?)))
+ #:configure-flags
(let ((out (assoc-ref %outputs "out")))
(list
"-DINDI_BUILD_UNITTESTS=ON"
@@ -2015,6 +2018,7 @@ (define-public indi
curl
fftw
gsl
+ libev
libjpeg-turbo
libnova
libtiff
--
2.38.1
S
S
Sharlatan Hellseher wrote on 19 Dec 2022 00:16
(address . 59978@debbugs.gnu.org)
CAO+9K5qJdsHWqPmdo0Oqiug2M_5in+w=G2rL8=h2ZQp8hCCzrg@mail.gmail.com
Hi Guix!
Is anything I need to check for this series?
Regards,
Oleg
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
S
S
Sharlatan Hellseher wrote on 27 Dec 2022 19:19
(address . 59978@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
CAO+9K5omTprCNPuEsGfqV7vTsdhASYejJQuJR=G3XSsCkXxC1w@mail.gmail.com
Hi,
I see QA is green and solved some previously failed builds for ARM. I'm
about to complete an update for CASA core package which allows to add
python-casa.
Let me know if I need to change this patch series.
Happy New year!
Oleg
On Sun, 18 Dec 2022, 23:16 Sharlatan Hellseher, <sharlatanus@gmail.com>
wrote:
Toggle quote (12 lines)
> Hi Guix!
>
> Is anything I need to check for this series?
>
> Regards,
> Oleg
>
> --
> … ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
> ????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
> ?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
>
Attachment: file
L
L
Ludovic Courtès wrote on 6 Jan 2023 23:46
Re: bug#59978: [PATCH 0/6] gnu: python-astropy: Unbundle WCSLIB.
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 59978-done@debbugs.gnu.org)
87h6x3xowc.fsf@gnu.org
Hi Oleg,

Sharlatan Hellseher <sharlatanus@gmail.com> skribis:

Toggle quote (7 lines)
> gnu: cfitsio: Update to 4.2.0.
> gnu: cfitsio: Build with bzip2 support.
> gnu: python-fitsio: Update to 1.1.8.
> gnu: wcslib: Update to 7.12.
> gnu: python-astropy: Update to 5.1.1.
> gnu: indi: Update to 1.9.9.

Sorry for taking so long, finally applied!

Thank you & happy new year!

Ludo’.
Closed
?