GNU bug report logs - #56364
[PATCH] gnu: Add glymur

Previous Next

Package: guix-patches;

Reported by: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Date: Sat, 2 Jul 2022 20:36:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 56364 in the body.
You can then email your comments to 56364 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#56364; Package guix-patches. (Sat, 02 Jul 2022 20:36:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 02 Jul 2022 20:36:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add glymur
Date: Sat, 2 Jul 2022 21:34:33 +0100
[Message part 1 (text/plain, inline)]
Hi Guix team!

This package contains Python interface to OpenJEPEG and LibTIFF which
requires some tweaks to let it find system library.

It's goes as one of the SunPy dependence I've started packing.

> ./pre-inst-env guix build python-glymur --rounds=2 --check
successfully built
/gnu/store/r77vwchzhhfi40xlmffwxyjpa4x8wxzv-python-glymur-0.10.1.drv
successfully built
/gnu/store/r77vwchzhhfi40xlmffwxyjpa4x8wxzv-python-glymur-0.10.1.drv
/gnu/store/nx10j711hps4glkxfw17gx0np1wnz1vh-python-glymur-0.10.1

-- 
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
[0001-gnu-Add-glymur.patch (text/x-patch, attachment)]

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Fri, 08 Jul 2022 21:58:02 GMT) Full text and rfc822 format available.

Notification sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
bug acknowledged by developer. (Fri, 08 Jul 2022 21:58:02 GMT) Full text and rfc822 format available.

Message #10 received at 56364-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 56364-done <at> debbugs.gnu.org
Subject: Re: bug#56364: [PATCH] gnu: Add glymur
Date: Fri, 08 Jul 2022 23:57:04 +0200
[Message part 1 (text/plain, inline)]
Hi,

Sharlatan Hellseher <sharlatanus <at> gmail.com> skribis:

> From 776f0ce0a22c83809d9a3dc4752180580e3632df Mon Sep 17 00:00:00 2001
> From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
> Date: Sat, 2 Jul 2022 21:28:39 +0100
> Subject: [PATCH] gnu: Add glymur
>
> * gnu/packages/python-xyz.scm (python-glymur): New variable.

Applied with the changes below: in this case ‘search-input-file’ is an
improvement IMO because it ensures that the file you’re looking for
(“libopenjp2.so”, etc.) actually exists.  Also it allows us to refer to
the ‘glibc’ package that implicitly provided rather than add a
dependency on an extra ‘glibc’ variant.

Thanks!

Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 76491631ae..3f4867ece0 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -931,7 +931,7 @@ (define-public python-glymur
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'patch-library-locations
-            (lambda _
+            (lambda* (#:key inputs #:allow-other-keys)
               ;; XXX: It's a workaround for Python inability to find the
               ;; .so libraries with ctypes.util.find_library()
               (substitute* '("glymur/config.py")
@@ -939,13 +939,13 @@ (define-public python-glymur
                  (string-append
                   "if libname == \"openjp2\":\n"
                   "        path = \""
-                  #$(this-package-input "openjpeg") "/lib/libopenjp2.so\"\n"
+                  (search-input-file inputs "/lib/libopenjp2.so") "\"\n"
                   "    elif libname == \"tiff\":\n"
                   "        path = \""
-                  #$(this-package-input "libtiff") "/lib/libtiff.so\"\n"
+                  (search-input-file inputs "/lib/libtiff.so") "\"\n"
                   "    elif libname == \"c\":\n"
                   "        path = \""
-                  #$(this-package-input "glibc") "/lib/libc.so.6\"\n")))))
+                  (search-input-file inputs "/lib/libc.so.6") "\"\n")))))
           ;; TODO: implement as a feature of python-build-system (PEP-621,
           ;; PEP-631, PEP-660)
           (replace 'build
@@ -971,8 +971,7 @@ (define-public python-glymur
      (list python-pypa-build python-pytest))
     (inputs
      (list openjpeg  ; glymur/lib/openjp2.py
-           libtiff   ; glymur/lib/tiff.py
-           glibc))
+           libtiff)) ; glymur/lib/tiff.py
     (propagated-inputs
      (list python-lxml
            python-numpy

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 06 Aug 2022 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 319 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.