From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57220) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXgf3-0003y8-CW for guix-patches@gnu.org; Tue, 26 Jun 2018 01:37:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXgf0-00061F-87 for guix-patches@gnu.org; Tue, 26 Jun 2018 01:37:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:55883) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fXgez-000613-TA for guix-patches@gnu.org; Tue, 26 Jun 2018 01:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fXgez-0000L1-N9 for guix-patches@gnu.org; Tue, 26 Jun 2018 01:37:01 -0400 Subject: [bug#31957] [PATCH] gnu: Add python-libusb1. Resent-Message-ID: From: Vagrant Cascadian In-Reply-To: <877emmejjg.fsf@fastmail.com> References: <87r2kwne89.fsf@aikidev.net> <877emmejjg.fsf@fastmail.com> Date: Mon, 25 Jun 2018 22:35:40 -0700 Message-ID: <8736xanm8j.fsf@aikidev.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: Marius Bakke , 31957@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain On 2018-06-25, Marius Bakke wrote: > Vagrant Cascadian writes: > >> Add new package definition for python-libusb1, needed to upgrade >> python-trezor to newer versions. > > Thanks! I have some minor nitpicks: ... > Can you send an updated patch? Thanks in advance! Updated patch attached: - Add myself to copyright headers - Drop unused srfi-26 - Remove needless line break - Flesh out description a bit... - Remove COPYING file, which didn't match the licensing of the files The removal of COPYING was pretty much a shotgun-style approach, but I couldn't figure out how to do a more surgical removal, and there weren't any other COPYING files in the source. The description could probably be further improved... but that's as far as I got for now... :) live well, vagrant --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-python-libusb1.patch Content-Transfer-Encoding: quoted-printable From=20088c81c4ca3a95bf51f04aec836aaedee8ab9ba8 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Tue, 26 Jun 2018 05:22:48 +0000 Subject: [PATCH] gnu: Add python-libusb1. * gnu/packages/libusb.scm (python-libusb1): New variable. =2D-- gnu/packages/libusb.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm index 62c936c19..39814bc90 100644 =2D-- a/gnu/packages/libusb.scm +++ b/gnu/packages/libusb.scm @@ -7,6 +7,7 @@ ;;; Copyright =C2=A9 2016 Theodoros Foradis ;;; Copyright =C2=A9 2017 Jonathan Brielmaier ;;; Copyright =C2=A9 2018 Tobias Geerinckx-Rice +;;; Copyright =C2=A9 2018 Vagrant Cascadian ;;; ;;; This file is part of GNU Guix. ;;; @@ -214,6 +215,49 @@ with usb4java.") implementing @code{javax.usb} (JSR-80).") (license expat))) =20 +(define-public python-libusb1 + (package + (name "python-libusb1") + (version "1.6.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "libusb1" version)) + (sha256 + (base32 + "03b7xrz8vqg8w0za5r503jhcmbd1ls5610jcja1rqz833nf0v4wc")))) + (build-system python-build-system) + (arguments + `(#:modules ((srfi srfi-1) + (guix build utils) + (guix build python-build-system)) + #:phases + (modify-phases %standard-phases + (add-before 'install-license-files 'remove-incorrect-license + (lambda* (#:key out #:allow-other-keys) + ;; Was reliscensed to LGPL 2.1+, but old COPYING file still l= eft + ;; in source. Remove it so it does not get installed. + (delete-file-recursively "COPYING") + #t)) + (add-after 'unpack 'fix-libusb-reference + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "usb1/libusb1.py" + (("libusb_path =3D ctypes.util.find_library\\(base_name\\)") + (string-append + "libusb_path =3D \"" + (find (negate symbolic-link?) + (find-files (assoc-ref inputs "libusb") + "^libusb.*\\.so\\..*")) + "\""))) + #t))))) + (inputs `(("libusb" ,libusb))) + (home-page "http://github.com/vpelletier/python-libusb1") + (synopsis "Pure-python wrapper for libusb-1.0") + (description "Libusb is a library that gives applications easy access = to +USB devices on various operating systems. This is a python wrapper for +acessing libusb-1.0") + (license lgpl2.1+))) + (define-public python-pyusb (package (name "python-pyusb") =2D-=20 2.11.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEcDardHbDotegGFCHt4uC1IFLkbYFAlsx0KwACgkQt4uC1IFL kba6zQ/+PL1IBColD++X9UCgBmPJeohwee/lboY/junfjLmPrlDxdNiZ4v/UX+Cj HpOXFJeYtW+32BZ+ImxolTQUSefIuapjr0XW6DIS4OCVF39IDL9+JmMLj5fsHp5/ Z2QV0Ve+YDSrtHD95qQbYfRWujO2A40QQnpbiUw1OLL4VgpcpWFOBxZX/+0x7tKY v94nqB1WWVtrD8CgERE8C3M64ICHUaR2uMET4nWFbONg3gM74CwvEfFXIYHiaG4t gVQWEFY1p7WV2Nqvec4Ql+dlOM6C6BiOG7ImH8pRlDv1hrd2jjYKxG+qMN7NVpXj Nc5SWeUoBHNG9Q9GydsZ64Ka+Jd7R+NUZlRjNcxWSHIvD3YSek+XGsEyAIVw7/Mq h998kwS2BbQ+UcdH39MoHOCBjjEgEsi66p2tlhSkTKcAhfdCEAKMrdbKo5TmkfoG Uza22aTkxQOjUvTGqMaghdNIZxRGuT+Aq8Dh6H0quFJ8xFBBhCgcnK6ajssHO+cQ 01ebUJTJZFpO6prGZR4kkCvQGBjQBkKlLCHEGF30i0PpkUeo0Y6i84EYhhy1U+IM Ur8jE1kpySTX87CkzEvZ87zn+v78+AXHbpjq0x/CvsN+QFx7m2QV2ar4nIF3M6D2 TuVo1FG03RAIiYFLxodb3ns1h+BmQyfIsebFg8l+QrwVOM7+rNA= =RNHY -----END PGP SIGNATURE----- --==-=-=--