From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 808AJ5Xnc2QPzgAASxT56A (envelope-from ) for ; Mon, 29 May 2023 01:45:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id wBlLJpXnc2S+UwAA9RJhRA (envelope-from ) for ; Mon, 29 May 2023 01:45:25 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 125823C527 for ; Mon, 29 May 2023 01:45:25 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3Q4W-0005Da-Bd; Sun, 28 May 2023 19:45:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3Q4T-0005D3-65 for guix-patches@gnu.org; Sun, 28 May 2023 19:45:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q3Q4S-0004fD-Tc for guix-patches@gnu.org; Sun, 28 May 2023 19:45:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q3Q4P-0006sv-P9 for guix-patches@gnu.org; Sun, 28 May 2023 19:45:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42682] [PATCH v3 7/9] gnu: Add python-hid. Resent-From: Fredrik Salomonsson Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 May 2023 23:45:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42682 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42682@debbugs.gnu.org Cc: Fredrik Salomonsson Received: via spool by 42682-submit@debbugs.gnu.org id=B42682.168531749626354 (code B ref 42682); Sun, 28 May 2023 23:45:05 +0000 Received: (at 42682) by debbugs.gnu.org; 28 May 2023 23:44:56 +0000 Received: from localhost ([127.0.0.1]:56626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3Q4G-0006qy-CD for submit@debbugs.gnu.org; Sun, 28 May 2023 19:44:56 -0400 Received: from mout02.posteo.de ([185.67.36.66]:38455) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3Q4B-0006qF-0B for 42682@debbugs.gnu.org; Sun, 28 May 2023 19:44:52 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 7A134240101 for <42682@debbugs.gnu.org>; Mon, 29 May 2023 01:44:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1685317485; bh=QWMH0DiCqqUXF682zK6sTpyPQ8wxv2fVG8eLHryyT5U=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version: Content-Transfer-Encoding:From; b=aPvvqRx6toMgxoAYjtbzCyAQzNbPmOg1obi218HEIZ2l0c4UJy2gkmxvj1hu3byEq g3Jwedxc41qX+Bb8uRqSTqnkH9U9O/PqouQSAJMF62exxf1E9po9jBdpPvGUt3Xvkh zCZ7FwmpTFZlv4NqLYVSxlc/S4VByP14Yrtwue4kRIe2ahOeCZTa5kLYKOEOFg4e9N WuUfFV03OkhU37kzIWyv6r2Ln5iCLXiPwxI+38VskRMirse2k3csKfoiO/HLFlzwc2 Z+j/FtEfxERnt0qYzoVQQfPIS4yu8Y8tfmnOR0GoUACXgRlXbw/LHzoE8ebzUYkIzX 12yBQB8yTEQrA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QTwHc5zktz9rxF; Mon, 29 May 2023 01:44:44 +0200 (CEST) From: Fredrik Salomonsson Date: Sun, 28 May 2023 23:44:05 +0000 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685317525; a=rsa-sha256; cv=none; b=NHiRzyy2mBTfi/H/H8GyD6w3aS7KY00/tI2R3I4XqEmP8oO5kp+XB1i2046hu4arIGoKsJ 4RxowcjZPezOqqvLatGU7xhbceDp982lgR5yJqT+adrjYYiLE+lsO3FyRm++1jYfEm+lQT aJ25k3zom2smjsinr5TEF1OOkLiTR8PfWCJ+QTWQifneQWGmeRIXQAtDFYBTn6IEloY9jI quFOeQHw1XAcV+N37oeKUx9Ef/7b6MTlWHRyR4Io/e9bS00Kdb9Guf5wa+ssDQaRDDYqCm ux93DsVhH5yMNpbdIkh9r1GcHhEVTWblol6p73ZgKrZInl4/91q8LllATUgr0g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=aPvvqRx6; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685317525; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=OgQK9nvlnRmTOW3K9nrciudBGfIr6QuRP0rK5cKpb18=; b=iQ8FTySoTaObc9XO7bFqoQIyD83iSLUJGzL/xx60+ZUUj7s1F01tdg6TbL7DXq+QyvUe5f CKLpaxJFv+U1fBFrFfIoKSDAplUpMlYEMetMAJXtZZ0C1uZbxGNWL9kIbDkEJxNnTSEguI SwrKg2hf8r2V0PqMgB4yNGI0c0zTEYxUe03Z0Xxpz+1iFzclrbLb1S6Tp1zJ4MxY5Bo1Kg AbMR24i1xI9PzFJtUSIsQMkTV+fUnhhurSJZfEGeEohnjRKYbsgRBFpRagqtJ3nTocQrN5 8VgpQ2eJVb6qSX/Ulp8zZDbstC5Vu/YfF5tNhUbkUv+zVXrtWDPdkKrQznOdDA== X-Migadu-Spam: Yes X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=aPvvqRx6; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Spam: Yes X-Migadu-Spam-Score: 8.15 X-Spam-Score: 8.15 X-Migadu-Queue-Id: 125823C527 X-TUID: lFBnntoZJIrV * gnu/packages/libusb.scm (python-hid): New variable. --- gnu/packages/libusb.scm | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm index d0837c8a91..8e81b0c1a9 100644 --- a/gnu/packages/libusb.scm +++ b/gnu/packages/libusb.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2021 Guillaume Le Vaillant ;;; Copyright © 2022 Jacob Hrbek ;;; Copyright © 2023 Sharlatan Hellseher +;;; Copyright © 2023 Fredrik Salomonsson ;;; ;;; This file is part of GNU Guix. ;;; @@ -44,6 +45,7 @@ (define-module (gnu packages libusb) #:use-module (guix build-system pyproject) #:use-module (guix build-system python) #:use-module (gnu packages autotools) + #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages curl) #:use-module (gnu packages gnupg) @@ -54,6 +56,7 @@ (define-module (gnu packages libusb) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages python-build) + #:use-module (gnu packages python-check) #:use-module (gnu packages python-xyz) #:use-module (gnu packages readline) #:use-module (gnu packages tls) @@ -650,6 +653,59 @@ (define-public hidapi license:bsd-3 (license:non-copyleft "file://LICENSE-orig.txt"))))) +(define-public python-hid + (package + (name "python-hid") + (version "1.0.5") + (source (origin + (method url-fetch) + (uri (pypi-uri "hid" version)) + (sha256 + (base32 + "1s5hvfbmnlmifswr5514f4xxn5rcd429bdcdqzgwkdxrg9zlx58y")))) + (build-system python-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-library-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* '("hid/__init__.py") + (("'libhidapi-hidraw.so'") + (string-append + "'" (search-input-file inputs "/lib/libhidapi-hidraw.so") "'")) + (("'libhidapi-libusb.so'") + (string-append + "'" (search-input-file inputs "/lib/libhidapi-libusb.so") "'")) + ;; Nuke the rest of the library_paths + (("[[:blank:]]+'libhidapi-hidraw.so.0',\n") + "") + (("[[:blank:]]+'libhidapi-libusb.so.0',\n") + "") + (("[[:blank:]]+'libhidapi-iohidmanager.so',\n") + "") + (("[[:blank:]]+'libhidapi-iohidmanager.so.0',\n") + "") + (("[[:blank:]]+'libhidapi.dylib',\n") + "") + (("[[:blank:]]+'hidapi.dll',\n") + "") + (("[[:blank:]]+'hidapi-0.dll',\n") + ""))))))) + (native-inputs + (list + python-nose + python-tox)) + (inputs + (list + hidapi)) + (home-page "https://github.com/apmorton/pyhidapi") + (synopsis "Ctypes bindings for hidapi") + (description "This package provides ctypes bindings in Python for the @code{hidapi} +package. Note that this package conflicts with the +@code{python-hidapi} package as they occupy the same Python namespace.") + (license license:expat))) + (define-public python-hidapi (package (name "python-hidapi") -- 2.40.1