From patchwork Fri Jul 28 12:23:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jean-Pierre De Jesus DIAZ X-Patchwork-Id: 52313 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D8A5A27BBEA; Fri, 28 Jul 2023 13:44:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id AD22327BBE2 for ; Fri, 28 Jul 2023 13:44:08 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qPMWn-0003FL-GA; Fri, 28 Jul 2023 08:25:05 -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 1qPMWm-0003Db-0C for guix-patches@gnu.org; Fri, 28 Jul 2023 08:25:04 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qPMWl-0007oo-ME for guix-patches@gnu.org; Fri, 28 Jul 2023 08:25:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qPMWl-0007LG-HG for guix-patches@gnu.org; Fri, 28 Jul 2023 08:25:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64896] [PATCH v2 1/8] gnu: Add python-hid. Resent-From: Jean-Pierre De Jesus DIAZ Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 28 Jul 2023 12:25:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64896 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64896@debbugs.gnu.org Cc: Jean-Pierre De Jesus DIAZ Received: via spool by 64896-submit@debbugs.gnu.org id=B64896.169054705928056 (code B ref 64896); Fri, 28 Jul 2023 12:25:03 +0000 Received: (at 64896) by debbugs.gnu.org; 28 Jul 2023 12:24:19 +0000 Received: from localhost ([127.0.0.1]:44009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPMW3-0007IK-6u for submit@debbugs.gnu.org; Fri, 28 Jul 2023 08:24:19 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:44232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPMVy-0007HP-Sb for 64896@debbugs.gnu.org; Fri, 28 Jul 2023 08:24:16 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-314417861b9so1922301f8f.0 for <64896@debbugs.gnu.org>; Fri, 28 Jul 2023 05:24:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundationdevices.com; s=google; t=1690547049; x=1691151849; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=75hhbhcU9bw0ke9iRtCWh+p8a32YXOjcBqZZAXriuE0=; b=HVL5e4DMxFHZ8C2bbIzZGoaquvd95Am27lh+WvfaKy/cE2SjtbSJJLLZIGc1wZY2fY IWA5BWuy4SazznTIjxYdu6e+sdkKkNVHh+zX6QQuq4qleCrW2vWPXgdF9Uy+Htv7kZ79 vqYIi3BXFvunxc6UaCVi6fyZAmHezbRJozA4pg4jMPnE9/en3N1p0kNfMLDJahkFuaPu bQICiyTy9duGnHKv7S0uAJsPmc41pKYlZQGt0hdS9visjqLEMfeeBo6XXQUyEk3E9EXG Xb8j9n31pdbEqVyeFuGpmGP94YHKEmw6YI5WVSrxqWVBwYt+t81CBTH1mLZo4XCiCfiC qWtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690547049; x=1691151849; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=75hhbhcU9bw0ke9iRtCWh+p8a32YXOjcBqZZAXriuE0=; b=LK96giPup5fm8B+3VRucDhAP/UIdjyX0KfvnL1qqALdLG35Fl+hkEIqWNCltxOIZRT b5Med60pi4mouL0fSvtwBeMjJkK6fXp7HrQO7aCiI702/tMSgtPmB3hlpCRhWhsEJRNl pw30O4+AGpSwiJ+6bcan15pe6UfPfNfGl97++BvfBH7rT9phcxjPVhl+RzU4+rFgEpWR YnW3bv2xYVizEPaljEvVMfOuPN4GNCydhskZpZGq5WacrieVN8CIUKqjTcXAPXX6Ilr4 JsXj6GV+oyzxHF5/wL2yDgueLBOS6GyAsV2RNDJPFKTcr0ZLUrINn8DC0UGCzQukRlPB GDUA== X-Gm-Message-State: ABy/qLYUnYfAXAIV5qrw0JMv3JLq5ynn3aiohK/9rM7J+IaPINPJcMFU MWT/OUcuFUhXquEoIR+IQB+QHBZr9bVsWi7Zg6Q6tQ== X-Google-Smtp-Source: APBJJlF0bgOugxx4jSUoB8P7f0JbYwvImU8Q/tRXj5ckFop5cemlsnSHBfSlOD6cpL4XqdEl8YbCHQ== X-Received: by 2002:a5d:4941:0:b0:313:e953:65d0 with SMTP id r1-20020a5d4941000000b00313e95365d0mr1811077wrs.28.1690547049051; Fri, 28 Jul 2023 05:24:09 -0700 (PDT) Received: from omen15.home ([89.131.29.87]) by smtp.gmail.com with ESMTPSA id x2-20020adfffc2000000b0031755da6a8asm4667210wrs.33.2023.07.28.05.24.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 05:24:08 -0700 (PDT) Date: Fri, 28 Jul 2023 14:23:56 +0200 Message-Id: <20230728122403.10140-2-jean@foundationdevices.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230728122403.10140-1-jean@foundationdevices.com> References: <20230728122403.10140-1-jean@foundationdevices.com> MIME-Version: 1.0 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: , Reply-to: Jean-Pierre De Jesus DIAZ X-ACL-Warn: , Jean-Pierre De Jesus DIAZ via Guix-patches X-Patchwork-Original-From: Jean-Pierre De Jesus DIAZ via Guix-patches via From: Jean-Pierre De Jesus DIAZ Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/libusb.scm (python-hid): New variable. Signed-off-by: Jean-Pierre De Jesus DIAZ --- gnu/packages/libusb.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm index 13090d30ab..c80e7061ad 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 Foundation Devices, Inc. ;;; ;;; This file is part of GNU Guix. ;;; @@ -653,6 +654,42 @@ (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 pyproject-build-system) + (arguments + ;; No tests present on the source tree, without this compilation fails + ;; because it "requires" the python-nose package, but it is not really + ;; necessary. + (list #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'add-extra-library-paths + (lambda _ + (let ((libhidapi-hidraw.so + #$(file-append hidapi "/lib/libhidapi-hidraw.so")) + (libhidapi-libusb.so + #$(file-append hidapi "/lib/libhidapi-libusb.so"))) + (substitute* "hid/__init__.py" + (("library_paths = \\(.*$" all) + (string-append + all + " '" libhidapi-hidraw.so "',\n" + " '" libhidapi-libusb.so "',\n"))))))))) + (inputs (list hidapi)) + (home-page "https://github.com/apmorton/pyhidapi") + (synopsis "Python @code{ctypes} bindings for HIDAPI library") + (description "Python @code{ctypes} bindings for HIDAPI library.") + (license license:expat))) + (define-public python-hidapi (package (name "python-hidapi")