From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: Re: [PATCH] Add pyusb. Date: Tue, 29 Mar 2016 21:27:48 -0500 Message-ID: <20160329212748.7741d2be@openmailbox.org> References: <87r3etoj7j.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1al5rc-0002J0-9q for guix-devel@gnu.org; Tue, 29 Mar 2016 22:28:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1al5rZ-0008U7-31 for guix-devel@gnu.org; Tue, 29 Mar 2016 22:28:08 -0400 Received: from smtp2.openmailbox.org ([62.4.1.36]:49100) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1al5rY-0008Tq-Sz for guix-devel@gnu.org; Tue, 29 Mar 2016 22:28:05 -0400 In-Reply-To: <87r3etoj7j.fsf@elephly.net> 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.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ricardo Wurmus Cc: guix-devel On Tue, 29 Mar 2016 09:07:44 +0200 Ricardo Wurmus wrote: > From a5a632c0f11d650a8e3bcae64ea8680aa90d3cf6 Mon Sep 17 00:00:00 2001 > From: Ricardo Wurmus > Date: Tue, 29 Mar 2016 09:06:09 +0200 > Subject: [PATCH] gnu: Add python-pyusb. > > * gnu/packages/libusb.scm (python-pyusb, python2-pyusb): New variables. > --- > gnu/packages/libusb.scm | 40 +++++++++++++++++++++++++++++++++++++++- > 1 file changed, 39 insertions(+), 1 deletion(-) > [...] > @@ -87,6 +89,42 @@ devices on various operating systems.") > version of libusb to run with newer libusb.") > (license lgpl2.1+))) > > +(define-public python-pyusb > + (package > + (name "python-pyusb") > + (version "1.0.0rc1") > + (source > + (origin > + (method url-fetch) > + (uri (pypi-uri "pyusb" version)) > + (sha256 > + (base32 > + "07cjq11qhngzjd746k7688s6y2x7lpj669fxqfsiy985rg0jsn7j")))) > + (build-system python-build-system) > + (arguments > + `(#:tests? #f ;no tests > + #:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'fix-libusb-reference > + (lambda* (#:key inputs #:allow-other-keys) > + (substitute* "usb/libloader.py" > + (("lib = locate_library\\(candidates, find_library\\)") > + (string-append "lib = \"" > + (assoc-ref inputs "libusb") > + "/lib/libusb-1.0.so.0.1.0" Is there any way to derive the soversion to help avoid breakage from future libusb updates? `~Eric