From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:49782) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ivzsL-0006Ur-4U for guix-patches@gnu.org; Mon, 27 Jan 2020 03:36:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ivzsI-00011F-T2 for guix-patches@gnu.org; Mon, 27 Jan 2020 03:36:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51824) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ivzsI-000111-LW for guix-patches@gnu.org; Mon, 27 Jan 2020 03:36:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ivzsI-0006Us-Ij for guix-patches@gnu.org; Mon, 27 Jan 2020 03:36:02 -0500 Subject: [bug#39292] [PATCH 01/10] gnu: Add python-pymediainfo Resent-Message-ID: References: <160809722.12896.1580033265330@office.mailbox.org> <20200126172437.1644-1-sschott@mailbox.org> From: Christopher Baines In-reply-to: <20200126172437.1644-1-sschott@mailbox.org> Date: Mon, 27 Jan 2020 08:35:43 +0000 Message-ID: <87mua9i9eo.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Sebastian Schott Cc: 39292@debbugs.gnu.org --=-=-= Content-Type: text/plain Sebastian Schott writes: > * gnu/packages/python-xyz.scm (python-pymediainfo): New variable. > --- > gnu/packages/python-xyz.scm | 41 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 41 insertions(+) > > diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm > index 2c308796e7..9f5cb20095 100644 > --- a/gnu/packages/python-xyz.scm > +++ b/gnu/packages/python-xyz.scm > @@ -166,6 +166,47 @@ > #:use-module (srfi srfi-1) > #:use-module (srfi srfi-26)) > > +(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))) > + (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/libmediainfo.so.0"))))) There's a convention of phases returning #t (I think), so it would be good to just put #t at the end of this phase. > + (replace 'check > + (lambda _ > + ;; Extend PYTHONPATH so the built package will be found. > + (setenv "PYTHONPATH" > + (string-append (getcwd) "/build/lib:" > + (getenv "PYTHONPATH"))) > + (invoke "pytest" "-vv" "-k" "not > test_parse_url")))))) Here, is the "not test_parse_url" bit taken from the upstream source, or does it have significance for the Guix package? Also, if the only reason the check phase doesn't work is the PYTHONPATH, you could always do something like: (add-before 'check 'set-PYTHONPATH (lambda _ ;; Extend PYTHONPATH so the built package will be found. (setenv "PYTHONPATH" (string-append (getcwd) "/build/lib:" (getenv "PYTHONPATH"))) #t)) > + (home-page > + "https://github.com/sbraz/pymediainfo") > + (synopsis > + "Python wrapper for the mediainfo library") > + (description > + "Python wrapper for the mediainfo library to access the > technical and tag data for video and audio files.") This line is a bit too long, not in terms of the value, but in terms of how it's represented in the source code. Running guix lint on this package should tell you this. This is also true for some other new packages added in other patches in this series, there's a list here [1]. 1: https://guix-patches-data.cbaines.net/compare?base_commit=3cb8cb666069804551148b9c49ebaea6b3a9973e&target_commit=cf6f9c3d5d13c37af3852734778ec11b26ac8d4b Thanks, Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl4uoN9fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xch2BAApI/k0Ysw4sh+4qLYdt4I9OYEJd/Mjts0JHi5SrE3QgHpqyc6dfeJibd6 OnpdDdC7PNgHOlOs58iAPNIWxWMNwwRhOOzg/MwZSduils5ZQpmVZXgdss4MCOLW nX+6w6puMfgn43hZ/BgWPHwjL/ebmaNLT/TDDni8ef/xQT99UsHKuhPv74TZ8d0U ytANbaZPwLyzz1MeYa1R95TRmv0ho/It0mQB1kTYQgJLT0MArESbylUwqYXn6OMo UTKdG2S91ND48WZEsa0NQSF1cQJfj5YkWXJF4NVFG0ZyrAA54nq5ryFLli9zc+Po CR13TXszu5rxSyhJch/gAypPJAfoMugWjbK6m7LqTwM1O/ppda82tuZ51fd8RboU dyo6DpJLNs27GAH9VJQ60wyJ5xDQbeLiMcQm+qc6fRv4kgnVKdBDsmhfjeaTBxfU lhG96BOe/L1xKnAOs3Bn7L0VRGQmnjCkVxXyDAsvx5gy1fubABEalb5wmaxuCHju FJJKBezkWZpuenGEgHWAhqvreXYCA5ylsIBkPv4/nQDE3u1zujBhTPk9WH/QupdU mqc3+UlxFzAaSrmzOHVTyMdCU4jxXA9TWsPNeZL08rx+rbZbWsWT4eZUzjedTftS CYL489XvaoMDf2Q/F4coRSuvhnKy88RK+Bc45f4VT4H2sZuQ0W0= =7a54 -----END PGP SIGNATURE----- --=-=-=--