From unknown Sat Aug 16 19:17:18 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#29850] [PATCH] gnu: Add python-hidapi. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Dec 2017 23:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 29850 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 29850@debbugs.gnu.org X-Debbugs-Original-To: Received: via spool by submit@debbugs.gnu.org id=B.151424302427085 (code B ref -1); Mon, 25 Dec 2017 23:04:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Dec 2017 23:03:44 +0000 Received: from localhost ([127.0.0.1]:52225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eTbma-00072n-A0 for submit@debbugs.gnu.org; Mon, 25 Dec 2017 18:03:44 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41201) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eTbmY-00072Z-Ez for submit@debbugs.gnu.org; Mon, 25 Dec 2017 18:03:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eTbmS-0004Du-F6 for submit@debbugs.gnu.org; Mon, 25 Dec 2017 18:03:37 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39982) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eTbmS-0004Di-Cm for submit@debbugs.gnu.org; Mon, 25 Dec 2017 18:03:36 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eTbmR-0000ac-3m for guix-patches@gnu.org; Mon, 25 Dec 2017 18:03:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eTbmM-0004BD-6W for guix-patches@gnu.org; Mon, 25 Dec 2017 18:03:35 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:40996) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eTbmM-00049y-06 for guix-patches@gnu.org; Mon, 25 Dec 2017 18:03:30 -0500 Received: from localhost (77.118.177.251.wireless.dyn.drei.com [77.118.177.251]) by dd26836.kasserver.com (Postfix) with ESMTPSA id CE5FF336220D for ; Tue, 26 Dec 2017 00:03:24 +0100 (CET) Date: Tue, 26 Dec 2017 00:03:19 +0100 From: Danny Milosavljevic Message-ID: <20171226000319.6b5c478f@scratchpost.org> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) * gnu/packages/libusb.scm (python-hidapi, python2-hidapi): New variables. --- gnu/packages/libusb.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm index 31c7dfa44..404ae8659 100644 --- a/gnu/packages/libusb.scm +++ b/gnu/packages/libusb.scm @@ -352,3 +352,40 @@ HID-Class devices.") (license (list gpl3 bsd-3 (non-copyleft "file://LICENSE-orig.txt"))))) + +(define-public python-hidapi + (package + (name "python-hidapi") + (version "0.7.99.post21") + (source + (origin + (method url-fetch) + (uri (pypi-uri "hidapi" version)) + (sha256 + (base32 + "15ws59zdrxahf3k7z5rcrwc4jgv1307anif8ixm2cyb9ask1mgp0")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-configuration + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "setup.py" + (("'/usr/include/libusb-1.0'") + (string-append "'" (assoc-ref inputs "libusb") + "/include/libusb-1.0'"))) + #t))))) + (inputs + `(("libusb" ,libusb) + ("eudev" ,eudev))) + (native-inputs + `(("python-cython" ,python-cython))) + (home-page "https://github.com/trezor/cython-hidapi") + (synopsis "Cython interface to hidapi") + (description "A Cython interface to the hidapi.") + ;; The library can be used under either of these licenses. + ;; TODO cython-hidapi DIY license. + (license (list gpl3 bsd-3)))) + +(define-public python2-hidapi + (package-with-python2 python-hidapi)) From unknown Sat Aug 16 19:17:18 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#29850] [PATCH] gnu: Add python-hidapi. Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 26 Dec 2017 18:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29850 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Danny Milosavljevic Cc: 29850@debbugs.gnu.org Received: via spool by 29850-submit@debbugs.gnu.org id=B29850.151431385815952 (code B ref 29850); Tue, 26 Dec 2017 18:45:02 +0000 Received: (at 29850) by debbugs.gnu.org; 26 Dec 2017 18:44:18 +0000 Received: from localhost ([127.0.0.1]:52872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eTuD4-00049D-0f for submit@debbugs.gnu.org; Tue, 26 Dec 2017 13:44:18 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:55527) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eTuD2-000494-Jg for 29850@debbugs.gnu.org; Tue, 26 Dec 2017 13:44:17 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id ED519205DE; Tue, 26 Dec 2017 13:44:15 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Tue, 26 Dec 2017 13:44:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= mesmtp; bh=JZFwzOMw5uJHNd0eiwyqdaKk1rcbxqGUHcgEUpndJds=; b=X0LaS wA9fZTokvFZwB76mqP6oGAbXRllo9qnSLsHQVqLWv9mhlvle/iiPomWJXB1Fxo0a oRb9MJfpD2I6wkDFZ4X3zVyazc36hcougRVvedTp46dLOcbMrg8SSG9K5emvn7iH Pz6w5pDrcpdFe6z5PZZT4T+vtbZjmLWeQaIwpo= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=JZFwzOMw5uJHNd0eiwyqdaKk1rcbx qGUHcgEUpndJds=; b=shSFYaGwzR9Sc/BbEbytwKkHjJ61oz/zledONIl3flDHv TSL7nS5mMIb0xU6YHCz1oRxxZoGgiC8LZkatow19gAA0BiY5v6rWV6gq1qiwuYCp sNfa4yPYewfQBFfHp+QmwyGrKVrNtIBymoR0+UFY2UV1FWD5+Lelwjrk5YVpxDkr yTRs6CnXaCIrof3zO9KAasldZm+IELbhVqOM1x+t5Fe35X6JeOrIQeEhfqDC4KTn SpW38Fcf/2CKHpwfXUskft8du9hAhNrU4pxQcFIHliL325eAW6rEc7jT3eehgPAy wQMjSxirysDPCwMqAGdo6vtThXsljZwFV9PFVsOLA== X-ME-Sender: Received: from localhost (c-76-109-243-109.hsd1.fl.comcast.net [76.109.243.109]) by mail.messagingengine.com (Postfix) with ESMTPA id A462B2442C; Tue, 26 Dec 2017 13:44:15 -0500 (EST) Date: Tue, 26 Dec 2017 13:44:14 -0500 From: Leo Famulari Message-ID: <20171226184414.GA1413@jasmine.lan> References: <20171226000319.6b5c478f@scratchpost.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="J/dobhs11T7y2rNN" Content-Disposition: inline In-Reply-To: <20171226000319.6b5c478f@scratchpost.org> User-Agent: Mutt/1.9.2 (2017-12-15) X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --J/dobhs11T7y2rNN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Dec 26, 2017 at 12:03:19AM +0100, Danny Milosavljevic wrote: > * gnu/packages/libusb.scm (python-hidapi, python2-hidapi): New variables. > + (synopsis "Cython interface to hidapi") > + (description "A Cython interface to the hidapi.") Please make it a complete English sentence: This package provides a Cython interface to the HIDAPI library. Otherwise LGTM! --J/dobhs11T7y2rNN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlpCmHsACgkQJkb6MLrK fwjBnw//ZVNekt0XOjY6Tbfv0LOJWCGgHk9qQ5FNlidnm2ezIpFQ3JtDjB4uoolf VCajWTDZea0ee2vbde1rr9KnnIugFHG7a7N4uk8l7pR8/g1lSPnAa7Mk/oaOJLAI qqZWPC/Ep+qYMflXiyuuPBIh8nWwGXlK4Gfwp3ANJtklPSnjw699shm0vAqYfAsD jlbrm/J8ngIHXC3dCj2bXbxiHNv9IxTnOlkTslYc4F1UZwI6AqXtts++kTuuYnCH k0ynPkzCC6b7EDyQjsolhI5oa9BaBuBBVEE0Oof6d1WVRESGiu8DK+aOwBcrubac IlUpl20+7Z6Zwpkz65nj1sMtXfZFQYJWy3MRJ+EjX6O8aOwbafU4Bq/FV4n45yFj 8R4ZU6ZX92e6fyjff8fAY2dYIYbSSjX1xpw0caELty0r1+PaWKlxE+Czyfp7Po/z rVCg6Cv21zo46/GZKrSE1cgsLcv5hinQWxW+9F7N6mdJT7QNqqEZKnbr95XSdqyB FVOJVfnFYS3x7CeBQQ/V1pWThxdarRPoDPHowpk/v0naeDFdU7GkSJeqveSYBbHI hPpblB9oh3e8n579+YpOTaBAosJnxJUp9KPKW4GUACrfqq8FSfaVgQnmkS3ROmh0 w2EHLtJYk1543eZ2dD27AzHT9zCWHuQC35/Pwb9wDQWWprJQoiQ= =bik3 -----END PGP SIGNATURE----- --J/dobhs11T7y2rNN-- From unknown Sat Aug 16 19:17:18 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#29850] [PATCH] gnu: Add python-hidapi. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Dec 2017 00:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29850 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Leo Famulari Cc: 29850@debbugs.gnu.org Received: via spool by 29850-submit@debbugs.gnu.org id=B29850.151433423522254 (code B ref 29850); Wed, 27 Dec 2017 00:24:01 +0000 Received: (at 29850) by debbugs.gnu.org; 27 Dec 2017 00:23:55 +0000 Received: from localhost ([127.0.0.1]:53000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eTzVj-0005ms-EL for submit@debbugs.gnu.org; Tue, 26 Dec 2017 19:23:55 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:36714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eTzVf-0005mj-TE for 29850@debbugs.gnu.org; Tue, 26 Dec 2017 19:23:53 -0500 Received: from localhost (77.118.177.251.wireless.dyn.drei.com [77.118.177.251]) by dd26836.kasserver.com (Postfix) with ESMTPSA id DF9F033602A0; Wed, 27 Dec 2017 01:23:50 +0100 (CET) Date: Wed, 27 Dec 2017 01:23:49 +0100 From: Danny Milosavljevic Message-ID: <20171227012349.004bd308@scratchpost.org> In-Reply-To: <20171226184414.GA1413@jasmine.lan> References: <20171226000319.6b5c478f@scratchpost.org> <20171226184414.GA1413@jasmine.lan> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Tue, 26 Dec 2017 13:44:14 -0500 Leo Famulari wrote: > On Tue, Dec 26, 2017 at 12:03:19AM +0100, Danny Milosavljevic wrote: > > * gnu/packages/libusb.scm (python-hidapi, python2-hidapi): New variables. > > > + (synopsis "Cython interface to hidapi") > > + (description "A Cython interface to the hidapi.") > > Please make it a complete English sentence: > > This package provides a Cython interface to the HIDAPI library. Okay. What about the extra license? From unknown Sat Aug 16 19:17:18 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#29850] [PATCH v2] gnu: Add python-hidapi. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Dec 2017 11:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29850 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 29850@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 29850-submit@debbugs.gnu.org id=B29850.151437404027562 (code B ref 29850); Wed, 27 Dec 2017 11:28:02 +0000 Received: (at 29850) by debbugs.gnu.org; 27 Dec 2017 11:27:20 +0000 Received: from localhost ([127.0.0.1]:53167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eU9rj-0007AT-QQ for submit@debbugs.gnu.org; Wed, 27 Dec 2017 06:27:20 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:53376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eU9rh-0007AK-4k for 29850@debbugs.gnu.org; Wed, 27 Dec 2017 06:27:17 -0500 Received: from dayas.3.home (178.113.183.110.wireless.dyn.drei.com [178.113.183.110]) by dd26836.kasserver.com (Postfix) with ESMTPSA id BE4BC3360CFD; Wed, 27 Dec 2017 12:27:15 +0100 (CET) From: Danny Milosavljevic Date: Wed, 27 Dec 2017 12:27:10 +0100 Message-Id: <20171227112711.12943-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171226000319.6b5c478f@scratchpost.org> References: <20171226000319.6b5c478f@scratchpost.org> Tags: patch X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) * gnu/packages/libusb.scm (python-hidapi, python2-hidapi): New variables. --- gnu/packages/libusb.scm | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm index 31c7dfa44..7dd9a41eb 100644 --- a/gnu/packages/libusb.scm +++ b/gnu/packages/libusb.scm @@ -352,3 +352,63 @@ HID-Class devices.") (license (list gpl3 bsd-3 (non-copyleft "file://LICENSE-orig.txt"))))) + +(define-public python-hidapi + (package + (name "python-hidapi") + (version "0.7.99.post21") + (source + (origin + (method url-fetch) + (uri (pypi-uri "hidapi" version)) + (sha256 + (base32 + "15ws59zdrxahf3k7z5rcrwc4jgv1307anif8ixm2cyb9ask1mgp0")) + (modules '((guix build utils))) + (snippet + ;; Remove bundled libraries. + '(begin + (delete-file-recursively "hidapi"))))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-configuration + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "setup.py" + (("'/usr/include/libusb-1.0'") + (string-append "'" (assoc-ref inputs "libusb") + "/include/libusb-1.0'")) + (("'/usr/include/hidapi'") + (string-append "'" (assoc-ref inputs "hidapi") + "/include/hidapi'"))) + #t)) + (replace 'build + (lambda _ + ;; Necessary because python-build-system drops the arguments. + (invoke "python" "setup.py" "build" "--with-system-hidapi"))) + (replace 'check + (lambda _ + ;; Necessary because python-build-system drops the arguments. + (invoke "python" "setup.py" "test" "--with-system-hidapi"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + ;; Necessary because python-build-system drops the arguments. + (invoke "python" "setup.py" "install" "--with-system-hidapi" + (string-append "--prefix=" (assoc-ref outputs "out")) + "--single-version-externally-managed" "--root=/")))))) + (inputs + `(("hidapi" ,hidapi) + ("libusb" ,libusb) + ("eudev" ,eudev))) + (native-inputs + `(("python-cython" ,python-cython))) + (home-page "https://github.com/trezor/cython-hidapi") + (synopsis "Cython interface to hidapi") + (description "This package provides a Cython interface to @code{hidapi}.") + ;; The library can be used under either of these licenses. + ;; TODO Add cython-hidapi DIY license? + (license (list gpl3 bsd-3)))) + +(define-public python2-hidapi + (package-with-python2 python-hidapi)) From unknown Sat Aug 16 19:17:18 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#29850] [PATCH] gnu: Add python-hidapi. Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Dec 2017 19:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29850 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Danny Milosavljevic Cc: 29850@debbugs.gnu.org Received: via spool by 29850-submit@debbugs.gnu.org id=B29850.151440242829966 (code B ref 29850); Wed, 27 Dec 2017 19:21:01 +0000 Received: (at 29850) by debbugs.gnu.org; 27 Dec 2017 19:20:28 +0000 Received: from localhost ([127.0.0.1]:54138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUHFc-0007nG-G4 for submit@debbugs.gnu.org; Wed, 27 Dec 2017 14:20:28 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:54029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUHFa-0007n8-P1 for 29850@debbugs.gnu.org; Wed, 27 Dec 2017 14:20:27 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 1BDA120F01; Wed, 27 Dec 2017 14:20:26 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Wed, 27 Dec 2017 14:20:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= mesmtp; bh=yd1OUeB7w5VpN4SHVxF6/LU9+/9tA+cVAOT4iaqBqDE=; b=0sGI0 kRA0Tqt7SxSzlGNyjiYikPLKTiA48cmYoGPoK9ATpi1wI0T0u3Rwo8d3C+0SCL4A 6LuV1YhbcNXza3nUO+3pqXyO6H1yVkDiajXjPwa3S5mBYj1KXTW1Sm0hDU8jydAN goCNWqaSSsRQsd8jKilQb9YpFobnWpf4V3+y6E= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=yd1OUeB7w5VpN4SHVxF6/LU9+/9tA +cVAOT4iaqBqDE=; b=LwruAhEYJkDi9Sf0IwFSzSGdXaanTNMm61RKVTqZO2TZN huyvgfdtsMMfVNX9uwoKG//uwKW5eT+V/1sF/PiJAUElMyVAjTBBJNNP4FtN5z4n C0zUAFblZbKq+gFk1y3tC67VnTGw7DAaGgoDiaGbgIhZaUqq7DBtjH3ZRg+Ql9Gv JS6b5pqVf4oRKzrZ1rpEVSz4Nlfc108PQH8gOn2Fei0jMhqhWeZdmJbi1/9PmYgQ oKwa/HulI0WUKu/8TahmydoX5R1cx+1sjF/Dj/VTcb03pN2WiRSZWTaEl0zzGK1R TVwNlcrHwmzltRysYOudIDA89HNEl2hFbxtUBag+Q== X-ME-Sender: Received: from localhost (c-76-109-243-109.hsd1.fl.comcast.net [76.109.243.109]) by mail.messagingengine.com (Postfix) with ESMTPA id C34187E139; Wed, 27 Dec 2017 14:20:25 -0500 (EST) Date: Wed, 27 Dec 2017 14:20:24 -0500 From: Leo Famulari Message-ID: <20171227192024.GA21311@jasmine.lan> References: <20171226000319.6b5c478f@scratchpost.org> <20171226184414.GA1413@jasmine.lan> <20171227012349.004bd308@scratchpost.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="82I3+IH0IqGh5yIs" Content-Disposition: inline In-Reply-To: <20171227012349.004bd308@scratchpost.org> User-Agent: Mutt/1.9.2 (2017-12-15) X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --82I3+IH0IqGh5yIs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 27, 2017 at 01:23:49AM +0100, Danny Milosavljevic wrote: > On Tue, 26 Dec 2017 13:44:14 -0500 > Leo Famulari wrote: >=20 > > On Tue, Dec 26, 2017 at 12:03:19AM +0100, Danny Milosavljevic wrote: > > > * gnu/packages/libusb.scm (python-hidapi, python2-hidapi): New variab= les. =20 > >=20 > > > + (synopsis "Cython interface to hidapi") > > > + (description "A Cython interface to the hidapi.") =20 > >=20 > > Please make it a complete English sentence: > >=20 > > This package provides a Cython interface to the HIDAPI library. >=20 > Okay. >=20 > What about the extra license? I would add it to the list of licenses in the license field using the non-copyleft procedure. If you've never used non-copyleft, note that it is a procedure that takes a URI and comment as arguments. --82I3+IH0IqGh5yIs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIyBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlpD8ngACgkQJkb6MLrK fwju/Q/2KVxZrZPwE0UhWMbY9ANQyDyDrwKPb8OTjqIwQLm3akcPgvZlC6B7s01I mPSEbtAr1GRmiKJ/Y3S12Z9ANCgQ69nOWJKTyU08vpE0LFW540ylzHHwim5U6zwK wLOn3C3/mW5UHNvQgp1CVLNgVgxjfOE/ngjBPfdJ2eVEvP7YM3hnepXxmvIgCadd vSOmSqzp6lk3Vnw0F2bE9NEdTnFqkjvQJICdeqZk74jLrQ9J7TJyuuXD5swKx0tx Y93hw8XXAT0fQGAbv304bbYSoEvB8D4RJA69iOlk7VWlpJoEWMJZYI/zH+PzRgOI 2DKp91Md1bXa3GBzwEpp6Ie3BqRIihxj4yXGE0OJgiaEUikY3BuH9PaPnwRgVJ0I cGN+fZiN2KmU9gGfwhir0oEHLAzFu0kXTJRcabCxhq/bLh1CfJgujKh4edwVYf4u LpFbMhHwlEyNd43U1eW0wSN8+sVRhifn4Dpq9b08cXTogR3lkijjSC91d/POdZ9v 5ILBltQNoovAZzJVm3pPT7Y9MQmE+p7kIidbNulUjCgsYDEBpF9SmFJzT3dvBA3C STjL9zWZINyIGfMPZIB5beCZIUsxSjXkzBrVfncZFhH4PBPoEOSvfoIdFY3XyWTy iH0d71cLbyZVZ+8RlepBWZTaQf5w5HIU2jLAtUDDq7fVhzML7w== =NS37 -----END PGP SIGNATURE----- --82I3+IH0IqGh5yIs-- From unknown Sat Aug 16 19:17:18 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#29850] [PATCH v3] gnu: Add python-hidapi. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Dec 2017 19:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29850 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 29850@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 29850-submit@debbugs.gnu.org id=B29850.1514404439644 (code B ref 29850); Wed, 27 Dec 2017 19:54:02 +0000 Received: (at 29850) by debbugs.gnu.org; 27 Dec 2017 19:53:59 +0000 Received: from localhost ([127.0.0.1]:54177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUHm3-0000AK-FH for submit@debbugs.gnu.org; Wed, 27 Dec 2017 14:53:59 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:60802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUHm2-0000AB-68 for 29850@debbugs.gnu.org; Wed, 27 Dec 2017 14:53:58 -0500 Received: from dayas.3.home (178.113.141.58.wireless.dyn.drei.com [178.113.141.58]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 4488333612BA; Wed, 27 Dec 2017 20:53:56 +0100 (CET) From: Danny Milosavljevic Date: Wed, 27 Dec 2017 20:53:51 +0100 Message-Id: <20171227195351.10879-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171226000319.6b5c478f@scratchpost.org> References: <20171226000319.6b5c478f@scratchpost.org> Tags: patch X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) * gnu/packages/libusb.scm (python-hidapi, python2-hidapi): New variables. --- gnu/packages/libusb.scm | 62 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm index 31c7dfa44..b4db9e851 100644 --- a/gnu/packages/libusb.scm +++ b/gnu/packages/libusb.scm @@ -352,3 +352,65 @@ HID-Class devices.") (license (list gpl3 bsd-3 (non-copyleft "file://LICENSE-orig.txt"))))) + +(define-public python-hidapi + (package + (name "python-hidapi") + (version "0.7.99.post21") + (source + (origin + (method url-fetch) + (uri (pypi-uri "hidapi" version)) + (sha256 + (base32 + "15ws59zdrxahf3k7z5rcrwc4jgv1307anif8ixm2cyb9ask1mgp0")) + (modules '((guix build utils))) + (snippet + ;; Remove bundled libraries. + '(begin + (delete-file-recursively "hidapi"))))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-configuration + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "setup.py" + (("'/usr/include/libusb-1.0'") + (string-append "'" (assoc-ref inputs "libusb") + "/include/libusb-1.0'")) + (("'/usr/include/hidapi'") + (string-append "'" (assoc-ref inputs "hidapi") + "/include/hidapi'"))) + #t)) + (replace 'build + (lambda _ + ;; Necessary because python-build-system drops the arguments. + (invoke "python" "setup.py" "build" "--with-system-hidapi"))) + (replace 'check + (lambda _ + ;; Necessary because python-build-system drops the arguments. + (invoke "python" "setup.py" "test" "--with-system-hidapi"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + ;; Necessary because python-build-system drops the arguments. + (invoke "python" "setup.py" "install" "--with-system-hidapi" + (string-append "--prefix=" (assoc-ref outputs "out")) + "--single-version-externally-managed" "--root=/")))))) + (inputs + `(("hidapi" ,hidapi) + ("libusb" ,libusb) + ("eudev" ,eudev))) + (native-inputs + `(("python-cython" ,python-cython))) + (home-page "https://github.com/trezor/cython-hidapi") + (synopsis "Cython interface to hidapi") + (description "This package provides a Cython interface to @code{hidapi}.") + ;; The library can be used under either of these licenses. + ;; TODO Add cython-hidapi DIY license? + (license (list gpl3 bsd-3 + (non-copyleft + "https://github.com/trezor/cython-hidapi/blob/master/LICENSE-orig.txt"))))) + +(define-public python2-hidapi + (package-with-python2 python-hidapi)) From unknown Sat Aug 16 19:17:18 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#29850] [PATCH v3] gnu: Add python-hidapi. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Dec 2017 21:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29850 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Danny Milosavljevic , 29850@debbugs.gnu.org Received: via spool by 29850-submit@debbugs.gnu.org id=B29850.151441188911942 (code B ref 29850); Wed, 27 Dec 2017 21:59:02 +0000 Received: (at 29850) by debbugs.gnu.org; 27 Dec 2017 21:58:09 +0000 Received: from localhost ([127.0.0.1]:54248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUJiC-00036Y-Nq for submit@debbugs.gnu.org; Wed, 27 Dec 2017 16:58:08 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:57395) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUJiA-00036P-O7 for 29850@debbugs.gnu.org; Wed, 27 Dec 2017 16:58:07 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id AE75B20EB5; Wed, 27 Dec 2017 16:58:05 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Wed, 27 Dec 2017 16:58:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=VGUUzEdkZUYcIek4rJjh2ZAHDdHMvUQIgawiLF8baLM=; b=PmnB1xox Gr5rCks+0nK5DNPBXCf3GvCuliWM06V4Ra4GATDiUlyYuTKWvU8LxRZ3//Kq2a3A NJkg1aaJsXD9rHinUSQpC5tWlwmL1m6BE7LfNvzZFtLnlw0r/QcPcsxR4mHb+iZi b/Jsk7g54cRCh/ksKGb1mlbSpDCalUtDLicv3PdgBqHibS/YPTckolE0OrW+JAMx xuikkxXec3OJqtus8bEZHBcAZxrnOoCVklseqrZSHyoqzgQQcEoFYB+bqnPlhfY5 3NK7Q4A1wzxXC3aqELTaMVLL74+8rIqCpTvIQujBtHhOUbZ5nK14zIRAV9jl1BvT LmA7uQhVgxHa0g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=VGUUzEdkZUYcIek4rJjh2ZAHDdHMv UQIgawiLF8baLM=; b=gUlvjRByzrYgSo9CYb7G29OCS0P0VtQL8kOISvI9W6k80 OraHn5EQ5FGLkZjuEF+P2iUE24S64udcgTYM4F7kompGP1JVWMQJ6H/w2nGTxetN 2x8kpAFO7J1m7hr8yBMzkKX0PimSg8Y2ucxDrbLuPfFaYVj9qWHgplz+n++Pb/9o M5UkluTFH/AtpmkatCoUJaSieuzReDjF5NGb8atrWmFwWu9uuknz31aaJ4pgdJQo d+5j6ish9e3tfTlxEtYhvJxx/z8MM0NBnQ6ujVasfIqw0riKXD6txX39dSS9oKI/ CLskRKvvn6N3iyH+LzG7goklCHnInrVo5j6HAm1uA== X-ME-Sender: Received: from localhost (unknown [185.3.4.227]) by mail.messagingengine.com (Postfix) with ESMTPA id 343F724614; Wed, 27 Dec 2017 16:58:05 -0500 (EST) From: Marius Bakke In-Reply-To: <20171227195351.10879-1-dannym@scratchpost.org> References: <20171226000319.6b5c478f@scratchpost.org> <20171227195351.10879-1-dannym@scratchpost.org> User-Agent: Notmuch/0.25.3 (https://notmuchmail.org) Emacs/25.3.1 (x86_64-pc-linux-gnu) Date: Wed, 27 Dec 2017 22:58:03 +0100 Message-ID: <87tvwbdeac.fsf@fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Hello! Danny Milosavljevic writes: > * gnu/packages/libusb.scm (python-hidapi, python2-hidapi): New variables. [...] > +(define-public python-hidapi > + (package > + (name "python-hidapi") > + (version "0.7.99.post21") > + (source > + (origin > + (method url-fetch) > + (uri (pypi-uri "hidapi" version)) > + (sha256 > + (base32 > + "15ws59zdrxahf3k7z5rcrwc4jgv1307anif8ixm2cyb9ask1mgp0")) Please re-indent the entire expression with emacs or ./etc/indent-code.el. > + (modules '((guix build utils))) > + (snippet > + ;; Remove bundled libraries. > + '(begin > + (delete-file-recursively "hidapi"))))) In absense of a consensus on unspecified return values, return #t here. > + (build-system python-build-system) > + (arguments > + `(#:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'patch-configuration > + (lambda* (#:key inputs #:allow-other-keys) > + (substitute* "setup.py" > + (("'/usr/include/libusb-1.0'") > + (string-append "'" (assoc-ref inputs "libusb") > + "/include/libusb-1.0'")) > + (("'/usr/include/hidapi'") > + (string-append "'" (assoc-ref inputs "hidapi") > + "/include/hidapi'"))) > + #t)) > + (replace 'build > + (lambda _ > + ;; Necessary because python-build-system drops the arguments. > + (invoke "python" "setup.py" "build" "--with-system-hidapi"))) > + (replace 'check > + (lambda _ > + ;; Necessary because python-build-system drops the arguments. > + (invoke "python" "setup.py" "test" "--with-system-hidapi"))) > + (replace 'install > + (lambda* (#:key outputs #:allow-other-keys) > + ;; Necessary because python-build-system drops the arguments. > + (invoke "python" "setup.py" "install" "--with-system-hidapi" > + (string-append "--prefix=" (assoc-ref outputs "out")) > + "--single-version-externally-managed" "--root=/")))))) I don't think repeating the same comment thrice is necessary. Maybe just add an XXX note at the top mentioning why we do this dance rather than use python-build-system directly. It would be good to extend python-build-system to support this however. #:setuppy-flags? :) > + (inputs > + `(("hidapi" ,hidapi) > + ("libusb" ,libusb) > + ("eudev" ,eudev))) > + (native-inputs > + `(("python-cython" ,python-cython))) > + (home-page "https://github.com/trezor/cython-hidapi") > + (synopsis "Cython interface to hidapi") > + (description "This package provides a Cython interface to @code{hidapi}.") > + ;; The library can be used under either of these licenses. > + ;; TODO Add cython-hidapi DIY license? I think this TODO can be removed, we have lots of "one-off" licenses scattered throughout. > + (license (list gpl3 bsd-3 > + (non-copyleft > + "https://github.com/trezor/cython-hidapi/blob/master/LICENSE-orig.txt"))))) The (non-copyleft ...) procedure takes an optional comment. This license is short enough to fit, maybe we can just add the "whole" text? No strong opinion. The rest LGTM! > + > +(define-public python2-hidapi > + (package-with-python2 python-hidapi)) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlpEF2sACgkQoqBt8qM6 VPpfCAgAmrL41OAb5+xWj9IYFP3dN57ahFLNeBUbTxEzOOWxxY7Zdms0tZvTckYn 6kP2ncaFGMFo83JAx9XRlXye7OvNgidOSJ0WXUUNoXW86iIWcWdLN6MjJsMHuxTl v5wPYNfDFL6dOt9PETaIAMiqyfArquSFlWcTvyfX+ryWPo7k2rgdkSwXTXNohhiS RAkYNU/4GAn6quhRJu+jO6aDOiwrqg+V6MuK3mXarpf949q1QM4us6RQkfDlVQA4 yDB4jNR9F5Y9E7Kj3blHHYnNcooApvYbPB91eOZrcje/7U8Y6gHIUbRtyGplgdDA 40/xnARxdS4MD+Eosl3UjzGTqpjCWA== =T7Qf -----END PGP SIGNATURE----- --=-=-=-- From unknown Sat Aug 16 19:17:18 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Danny Milosavljevic Subject: bug#29850: closed (Re: [bug#29850] [PATCH v3] gnu: Add python-hidapi.) Message-ID: References: <20171228084100.44a3f150@scratchpost.org> <20171226000319.6b5c478f@scratchpost.org> X-Gnu-PR-Message: they-closed 29850 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 29850@debbugs.gnu.org Date: Thu, 28 Dec 2017 07:42:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1514446922-9617-1" This is a multi-part message in MIME format... ------------=_1514446922-9617-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #29850: [PATCH] gnu: Add python-hidapi. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 29850@debbugs.gnu.org. --=20 29850: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D29850 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1514446922-9617-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 29850-done) by debbugs.gnu.org; 28 Dec 2017 07:41:08 +0000 Received: from localhost ([127.0.0.1]:54489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUSoN-0002Tf-PG for submit@debbugs.gnu.org; Thu, 28 Dec 2017 02:41:07 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:50516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUSoL-0002TV-Kw for 29850-done@debbugs.gnu.org; Thu, 28 Dec 2017 02:41:06 -0500 Received: from localhost (77.118.151.70.wireless.dyn.drei.com [77.118.151.70]) by dd26836.kasserver.com (Postfix) with ESMTPSA id E48B8336029B; Thu, 28 Dec 2017 08:41:03 +0100 (CET) Date: Thu, 28 Dec 2017 08:41:00 +0100 From: Danny Milosavljevic To: Marius Bakke Subject: Re: [bug#29850] [PATCH v3] gnu: Add python-hidapi. Message-ID: <20171228084100.44a3f150@scratchpost.org> In-Reply-To: <87tvwbdeac.fsf@fastmail.com> References: <20171226000319.6b5c478f@scratchpost.org> <20171227195351.10879-1-dannym@scratchpost.org> <87tvwbdeac.fsf@fastmail.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 29850-done Cc: 29850-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi Marius, thanks for the review! Fixed these and pushed that patch to master. > It would be good to extend python-build-system to support this however. #:setuppy-flags? :) I agree. But I think Hartmut said that the arguments aren't necessarily the same for build, install and check. Let's see... ------------=_1514446922-9617-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 25 Dec 2017 23:03:44 +0000 Received: from localhost ([127.0.0.1]:52225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eTbma-00072n-A0 for submit@debbugs.gnu.org; Mon, 25 Dec 2017 18:03:44 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41201) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eTbmY-00072Z-Ez for submit@debbugs.gnu.org; Mon, 25 Dec 2017 18:03:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eTbmS-0004Du-F6 for submit@debbugs.gnu.org; Mon, 25 Dec 2017 18:03:37 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39982) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eTbmS-0004Di-Cm for submit@debbugs.gnu.org; Mon, 25 Dec 2017 18:03:36 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eTbmR-0000ac-3m for guix-patches@gnu.org; Mon, 25 Dec 2017 18:03:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eTbmM-0004BD-6W for guix-patches@gnu.org; Mon, 25 Dec 2017 18:03:35 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:40996) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eTbmM-00049y-06 for guix-patches@gnu.org; Mon, 25 Dec 2017 18:03:30 -0500 Received: from localhost (77.118.177.251.wireless.dyn.drei.com [77.118.177.251]) by dd26836.kasserver.com (Postfix) with ESMTPSA id CE5FF336220D for ; Tue, 26 Dec 2017 00:03:24 +0100 (CET) Date: Tue, 26 Dec 2017 00:03:19 +0100 From: Danny Milosavljevic To: Subject: [PATCH] gnu: Add python-hidapi. Message-ID: <20171226000319.6b5c478f@scratchpost.org> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) * gnu/packages/libusb.scm (python-hidapi, python2-hidapi): New variables. --- gnu/packages/libusb.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm index 31c7dfa44..404ae8659 100644 --- a/gnu/packages/libusb.scm +++ b/gnu/packages/libusb.scm @@ -352,3 +352,40 @@ HID-Class devices.") (license (list gpl3 bsd-3 (non-copyleft "file://LICENSE-orig.txt"))))) + +(define-public python-hidapi + (package + (name "python-hidapi") + (version "0.7.99.post21") + (source + (origin + (method url-fetch) + (uri (pypi-uri "hidapi" version)) + (sha256 + (base32 + "15ws59zdrxahf3k7z5rcrwc4jgv1307anif8ixm2cyb9ask1mgp0")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-configuration + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "setup.py" + (("'/usr/include/libusb-1.0'") + (string-append "'" (assoc-ref inputs "libusb") + "/include/libusb-1.0'"))) + #t))))) + (inputs + `(("libusb" ,libusb) + ("eudev" ,eudev))) + (native-inputs + `(("python-cython" ,python-cython))) + (home-page "https://github.com/trezor/cython-hidapi") + (synopsis "Cython interface to hidapi") + (description "A Cython interface to the hidapi.") + ;; The library can be used under either of these licenses. + ;; TODO cython-hidapi DIY license. + (license (list gpl3 bsd-3)))) + +(define-public python2-hidapi + (package-with-python2 python-hidapi)) ------------=_1514446922-9617-1--