From patchwork Wed Sep 20 10:05:25 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: 54067 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 E38FA27BBEC; Wed, 20 Sep 2023 11:06:25 +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 55ACD27BBE9 for ; Wed, 20 Sep 2023 11:06:24 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qiu5o-0002ma-Jg; Wed, 20 Sep 2023 06:06:00 -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 1qiu5j-0002lu-52 for guix-patches@gnu.org; Wed, 20 Sep 2023 06:05:56 -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 1qiu5h-0004HO-7l for guix-patches@gnu.org; Wed, 20 Sep 2023 06:05:54 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qiu5q-00048b-HE for guix-patches@gnu.org; Wed, 20 Sep 2023 06:06:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65911] [PATCH v1 1/4] gnu: Add python-smbus. References: <20230913095341.12586-1-jean@foundationdevices.com> In-Reply-To: <20230913095341.12586-1-jean@foundationdevices.com> Resent-From: Jean-Pierre De Jesus DIAZ Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 20 Sep 2023 10:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65911 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65911@debbugs.gnu.org Cc: Jean-Pierre De Jesus DIAZ Received: via spool by 65911-submit@debbugs.gnu.org id=B65911.169520435415864 (code B ref 65911); Wed, 20 Sep 2023 10:06:02 +0000 Received: (at 65911) by debbugs.gnu.org; 20 Sep 2023 10:05:54 +0000 Received: from localhost ([127.0.0.1]:58401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qiu5h-00047c-Ek for submit@debbugs.gnu.org; Wed, 20 Sep 2023 06:05:54 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:61724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qiu5d-00047C-8n for 65911@debbugs.gnu.org; Wed, 20 Sep 2023 06:05:51 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-403004a96a4so73439095e9.3 for <65911@debbugs.gnu.org>; Wed, 20 Sep 2023 03:05:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundationdevices.com; s=google; t=1695204334; x=1695809134; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=9Jfvo1TKzsRwJ7+NgzFjMYcTvXaabJ6/RaBxPXA3nIY=; b=YClc/389JJGJnoUlLPrVKHexqsZJb10lAcm9ez5VjcEQN94AFGiqB0mcqCEuPfuIvj GEwBFLpsAXF3w0ijAWDBYyEdW+7KrbK7Si7y6nABIn6unDXjKFE16dzp+TtRODTzeLs3 U2dwA+3DeCwFXAVcUrW1ICL4FMKrKCh0xE4nuwjaRmDmobOPlDwidC15KJPYgmMda99t CuCJs1+brKMhb4q7pqAXc0fPSi6JPLkycKpLG2MbuolDzPxHZf3rPpM/TPwCsc2sQOkO Ji7KMwQxUActESg9u7OndwyTIZ7XALC42M8VJsQjxkg52ngyxl1MMzm7iOUC7W3ruKiE 8hJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695204334; x=1695809134; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9Jfvo1TKzsRwJ7+NgzFjMYcTvXaabJ6/RaBxPXA3nIY=; b=sMbx0qiXkCFzkl4XbROdVna17Im7MoAayGAtxGA0Jdsn6ui/lF9UecZhCqdXpGU2HH 8q8CtdsRs0thkKgFsOkofM/WT9d/3OVVwEWUW/S15lJqy1G8vXl/iJ7xxc8H18IhisFX iQ6pwnawlevOnwFm39nwJhKb6vYYEDTWS/7fRH+WYVm5GIgFVGfWf1FVko+2EHPaWF5P u5oS+1AO7hYrVoPjHJ5wrcCZQ0rcAhTZRABfkrjcKJFo5BWj3nreduh1HtYo1Kl733W3 Wsst49XErmUQVxz3R0B/odP0F7YQ7gRDZWue/yhckFzp2gRLOoLfEWN5UbdopjSH5g0+ VC2w== X-Gm-Message-State: AOJu0YyG+3g7czt4najbXlJDqqWmhmz0rZktzHYaWO6l3Zk5AY/8Wfr0 H55wfHmYw8zpt5ZBnqe7w7i5Vp/E95OqMoMiWDuzJg== X-Google-Smtp-Source: AGHT+IGwvGVnqtsSSuYSRldnPS9FBt8yhpMkgW7fkFUEYssvWiy24K2IMXRzAOqMllDjZu5hwJaaGw== X-Received: by 2002:a05:600c:21a:b0:404:74e3:27ab with SMTP id 26-20020a05600c021a00b0040474e327abmr1966067wmi.41.1695204333137; Wed, 20 Sep 2023 03:05:33 -0700 (PDT) Received: from omen15.home ([89.131.29.87]) by smtp.gmail.com with ESMTPSA id y20-20020a05600c20d400b003fefaf299b6sm1496927wmm.38.2023.09.20.03.05.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 03:05:32 -0700 (PDT) Date: Wed, 20 Sep 2023 12:05:25 +0200 Message-Id: <20230920100528.1217339-1-jean@foundationdevices.com> X-Mailer: git-send-email 2.34.1 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/linux.scm (python-smbus): New variable. Signed-off-by: Jean-Pierre De Jesus DIAZ --- gnu/packages/linux.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) base-commit: 6bd17a0806ad32d1493ac51a7443276f719c4224 diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 85e3d9845d..6eb7fb43b8 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -75,6 +75,7 @@ ;;; Copyright © 2023 Yovan Naumovski ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2023 dan +;;; Copyright © 2023 Foundation Devices, Inc. ;;; ;;; This file is part of GNU Guix. ;;; @@ -188,6 +189,7 @@ (define-module (gnu packages linux) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system meson) + #:use-module (guix build-system pyproject) #:use-module (guix build-system python) #:use-module (guix build-system trivial) #:use-module (guix build-system linux-module) @@ -4963,6 +4965,29 @@ (define-public i2c-tools-3 #~(list (string-append "prefix=" #$output) (string-append "CC=" #$(cc-for-target)))))))) +(define-public python-smbus + (package + (inherit i2c-tools) + (name "python-smbus") + (build-system pyproject-build-system) + (arguments + (list #:tests? #f ;; No test suite. + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'change-directory + (lambda _ (chdir "py-smbus"))) + (add-after 'change-directory 'set-library-path + (lambda _ + (substitute* "setup.py" + (("-L\\.\\./lib") + (string-append "-L" #$(this-package-input "i2c-tools") + "/lib")))))))) + (inputs (list i2c-tools)) + (synopsis "I2C/SMBus access for Python") + (description "This package provides a Python library to access +@acronym{I2C, Inter-Integrated Circuit} and @acronym{SMBus, System +Management Bus} devices on Linux."))) + (define-public xsensors (package (name "xsensors")