From: Danny Milosavljevic <dannym@scratchpost.org>
To: 29850@debbugs.gnu.org
Subject: [bug#29850] [PATCH] gnu: Add python-hidapi.
Date: Tue, 26 Dec 2017 00:03:19 +0100 [thread overview]
Message-ID: <20171226000319.6b5c478f@scratchpost.org> (raw)
* 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))
next reply other threads:[~2017-12-25 23:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-25 23:03 Danny Milosavljevic [this message]
2017-12-26 18:44 ` [bug#29850] [PATCH] gnu: Add python-hidapi Leo Famulari
2017-12-27 0:23 ` Danny Milosavljevic
2017-12-27 19:20 ` Leo Famulari
2017-12-27 11:27 ` [bug#29850] [PATCH v2] " Danny Milosavljevic
2017-12-27 19:53 ` [bug#29850] [PATCH v3] " Danny Milosavljevic
2017-12-27 21:58 ` Marius Bakke
2017-12-28 7:41 ` bug#29850: " Danny Milosavljevic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171226000319.6b5c478f@scratchpost.org \
--to=dannym@scratchpost.org \
--cc=29850@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.