From mboxrd@z Thu Jan 1 00:00:00 1970 From: sschott@mailbox.org Subject: libmediainfo Date: Sun, 19 Jan 2020 23:07:02 +0100 (CET) Message-ID: <1627337633.28965.1579471622987@office.mailbox.org> Reply-To: sschott@mailbox.org Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:48966) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itIiu-0008GW-Pn for guix-devel@gnu.org; Sun, 19 Jan 2020 17:07:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itIit-0001j7-7O for guix-devel@gnu.org; Sun, 19 Jan 2020 17:07:12 -0500 Received: from mout-p-202.mailbox.org ([80.241.56.172]:51748) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1itIis-0001gR-K5 for guix-devel@gnu.org; Sun, 19 Jan 2020 17:07:11 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 48186L5Y6DzQlDD for ; Sun, 19 Jan 2020 23:07:06 +0100 (CET) Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id SI7ocFi7eU_0 for ; Sun, 19 Jan 2020 23:07:03 +0100 (CET) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: "guix-devel@gnu.org"
Hi all,

I am trying to package pymediainfo, but the build fails in the test phase with

"OSError: libmediainfo.so.0: cannot open shared object file: No such file or directory"

When I skip the test phase, the build succeeds, but using pymediainfo in a python script gives the same error. Injecting the library path into the __init__.py does not help.

(define-public python-pymediainfo
  (package
    (name "python-pymediainfo")
    (version "4.1")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pymediainfo" version))
        (sha256
          (base32
            "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
    (build-system python-build-system)
    (native-inputs
      `(("python-setuptools-scm" ,python-setuptools-scm)
         ("python-pytest" ,python-pytest)
         ("python-pytest-runner" ,python-pytest-runner)))
    (inputs
      `(("libmediainfo" ,libmediainfo)))
    (propagated-inputs
      `(("python-setuptools" ,python-setuptools)))
;    (arguments
     ;; FIXME: OSError: libmediainfo.so.0: cannot open shared object file: No such file or directory
;     '(#:tests? #f))
    (arguments
     `(#:phases (modify-phases %standard-phases
         (add-after 'unpack 'patch-libmediainfo
           (lambda _
             (substitute* "pymediainfo/__init__.py"
               (("libmediainfo.so.0") (string-append (assoc-ref %build-inputs "libmediainfo") "/lib/libmedia.so.0"))))))))
    (home-page
      "https://github.com/sbraz/pymediainfo")
    (synopsis
      "Python wrapper for the mediainfo library")
    (description
      "Python wrapper for the mediainfo library to access the most relevant technical and tag data for video and audio files.")
    (license license:expat)))


Best regards,

Sebastian