From patchwork Fri Jul 8 21:57:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 40612 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1C2E727BBEA; Fri, 8 Jul 2022 22:58:46 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CA54727BBE9 for ; Fri, 8 Jul 2022 22:58:45 +0100 (BST) Received: from localhost ([::1]:57302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9vzo-0005pk-Ri for patchwork@mira.cbaines.net; Fri, 08 Jul 2022 17:58:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9vzA-0005mY-MB for guix-patches@gnu.org; Fri, 08 Jul 2022 17:58:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39458) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o9vz8-0003V6-5o for guix-patches@gnu.org; Fri, 08 Jul 2022 17:58:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o9vz8-0006d4-4N for guix-patches@gnu.org; Fri, 08 Jul 2022 17:58:02 -0400 Subject: bug#56364: [PATCH] gnu: Add glymur Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Fri, 08 Jul 2022 21:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 56364 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Sharlatan Hellseher Cc: 56364-done@debbugs.gnu.org Mail-Followup-To: 56364@debbugs.gnu.org, ludo@gnu.org, sharlatanus@gmail.com Received: via spool by 56364-done@debbugs.gnu.org id=D56364.165731744125428 (code D ref 56364); Fri, 08 Jul 2022 21:58:01 +0000 Received: (at 56364-done) by debbugs.gnu.org; 8 Jul 2022 21:57:21 +0000 Received: from localhost ([127.0.0.1]:33354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o9vyM-0006bx-ET for submit@debbugs.gnu.org; Fri, 08 Jul 2022 17:57:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o9vyK-0006bl-75 for 56364-done@debbugs.gnu.org; Fri, 08 Jul 2022 17:57:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54354) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9vyE-00022a-Sc; Fri, 08 Jul 2022 17:57:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=1tU2nBU7ZYoAfsS1fq+54zeVtHonRgJhtSocZKzooMs=; b=p5t5uST+3PPUad1j182w S8G3Id//U3cdPUFRo7oXmYPXYFFCAtOw+hYqjLEhpM89BN4kVYMtCQiZQ//1wlzhG09U0vgLTxMZ9 Bb9YBrQdeJZM0M0k62/dTvRibMo7k9xi7VXkwzW07svGBZDwen7h7mxQ+uanFRp/MaIX3V22ss9Zx LygJpCTBgWPxtnMPNAZmbvkwhg/4vpu3U40YVVsD5lHD2zxo/zW6qfdlQSWq/kCS9Xug/H2x7wsze oORze4mObYhuCgQjCdWayo26S9fI37FB5b2R4UsndYYLcD45QwMqEGAZuET9WHTZ27iUBN6qy5yRG pRS23a1edFjJDA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:50549 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9vyE-00023q-GM; Fri, 08 Jul 2022 17:57:06 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= References: Date: Fri, 08 Jul 2022 23:57:04 +0200 In-Reply-To: (Sharlatan Hellseher's message of "Sat, 2 Jul 2022 21:34:33 +0100") Message-ID: <874jzrs1xr.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi, Sharlatan Hellseher skribis: > From 776f0ce0a22c83809d9a3dc4752180580e3632df Mon Sep 17 00:00:00 2001 > From: Sharlatan Hellseher > 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’. 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