GNU bug report logs - #72635
[PATCH] gnu: Add python-usbrelay.

Previous Next

Package: guix-patches;

Reported by: Evgeny Pisemsky <mail <at> pisemsky.site>

Date: Thu, 15 Aug 2024 07:17:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 72635 in the body.
You can then email your comments to 72635 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#72635; Package guix-patches. (Thu, 15 Aug 2024 07:17:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Evgeny Pisemsky <mail <at> pisemsky.site>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 15 Aug 2024 07:17:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Evgeny Pisemsky <mail <at> pisemsky.site>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add python-usbrelay.
Date: Thu, 15 Aug 2024 10:15:38 +0300
[0001-gnu-Add-python-usbrelay.patch (text/x-patch, inline)]
From 7848f0db92bee6fa523661d4599a294df1668b0c Mon Sep 17 00:00:00 2001
Message-ID: <7848f0db92bee6fa523661d4599a294df1668b0c.1723705343.git.mail <at> pisemsky.site>
From: Evgeny Pisemsky <mail <at> pisemsky.site>
Date: Thu, 15 Aug 2024 10:00:00 +0300
Subject: [PATCH] gnu: Add python-usbrelay.

* gnu/packages/hardware.scm (python-usbrelay): New variable.

Change-Id: Icc389604a9bbc8f91fd7b00c1f5cebe3faac3e09
---
 gnu/packages/hardware.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index d8530f8705..5c82f02255 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -70,6 +70,7 @@ (define-module (gnu packages hardware)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages lxqt)
+  #:use-module (gnu packages messaging)
   #:use-module (gnu packages mtools)
   #:use-module (gnu packages package-management)
   #:use-module (gnu packages ncurses)
@@ -1622,3 +1623,32 @@ (define-public usbrelay
 HID compatible USB relay modules available with different number of
 output relays.")
     (license license:gpl2+)))
+
+(define-public python-usbrelay
+  (package
+    (inherit usbrelay)
+    (name "python-usbrelay")
+    (build-system python-build-system)
+    (inputs (list usbrelay))
+    (propagated-inputs (list python-paho-mqtt))
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (add-after 'unpack 'install-daemon
+                     (lambda _
+                       (install-file "usbrelayd.8"
+                                     (string-append #$output "/share/man/man8"))
+                       (install-file "usbrelayd"
+                                     (string-append #$output "/sbin"))
+                       (chmod (string-append #$output "/sbin/usbrelayd") #o555)))
+                   (add-after 'install-daemon 'chdir-and-set-version
+                     (lambda _
+                       (chdir "usbrelay_py")
+                       (substitute* "setup.py"
+                         (("    version = .*")
+                          (string-append "    version = '"
+                                         #$(package-version usbrelay) "',\n")))
+                       (substitute* "src/__init__.py"
+                         (("__version__ = .*")
+                          (string-append "__version__ = \""
+                                         #$(package-version usbrelay) "\"\n"))))))))))

base-commit: 936928fe38946a7496273e636ca8888914d100a9
-- 
2.45.2





Information forwarded to guix-patches <at> gnu.org:
bug#72635; Package guix-patches. (Wed, 02 Oct 2024 13:57:02 GMT) Full text and rfc822 format available.

Message #8 received at 72635 <at> debbugs.gnu.org (full text, mbox):

From: Evgeny Pisemsky <mail <at> pisemsky.site>
To: 72635 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add python-usbrelay.
Date: Wed, 02 Oct 2024 16:55:55 +0300
Any problems with this patch?

Packaged using python-capstone and capstone as example.

Substitutions set actual version since upstream does not care.




Information forwarded to guix-patches <at> gnu.org:
bug#72635; Package guix-patches. (Fri, 28 Feb 2025 09:44:02 GMT) Full text and rfc822 format available.

Message #11 received at 72635 <at> debbugs.gnu.org (full text, mbox):

From: Evgeny Pisemsky <mail <at> pisemsky.site>
To: 72635 <at> debbugs.gnu.org
Subject: [PATCH v1] gnu: Add python-usbrelay.
Date: Fri, 28 Feb 2025 12:42:24 +0300
* gnu/packages/hardware.scm (python-usbrelay): New variable.

Change-Id: Icc389604a9bbc8f91fd7b00c1f5cebe3faac3e09
---
 gnu/packages/hardware.scm | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index 13850b8e12..b8a0acf1ff 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke <at> gnu.org>
 ;;; Copyright © 2020 Brice Waegeneire <brice <at> waegenei.re>
-;;; Copyright © 2021, 2023, 2024 Evgeny Pisemsky <mail <at> pisemsky.site>
+;;; Copyright © 2021, 2023-2025 Evgeny Pisemsky <mail <at> pisemsky.site>
 ;;; Copyright © 2021 Léo Le Bouter <lle-bout <at> zaclys.net>
 ;;; Copyright © 2021 Denis Carikli <GNUtoo <at> cyberdimension.org>
 ;;; Copyright © 2021, 2022 Petr Hodina <phodina <at> protonmail.com>
@@ -73,6 +73,7 @@ (define-module (gnu packages hardware)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages lxqt)
+  #:use-module (gnu packages messaging)
   #:use-module (gnu packages mtools)
   #:use-module (gnu packages package-management)
   #:use-module (gnu packages ncurses)
@@ -86,6 +87,7 @@ (define-module (gnu packages hardware)
   #:use-module (gnu packages protobuf)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
@@ -1616,3 +1618,26 @@ (define-public usbrelay
 HID compatible USB relay modules available with different number of
 output relays.")
     (license license:gpl2+)))
+
+(define-public python-usbrelay
+  (package
+    (inherit usbrelay)
+    (name "python-usbrelay")
+    (build-system pyproject-build-system)
+    (native-inputs (list python-setuptools python-wheel))
+    (inputs (list usbrelay))
+    (propagated-inputs (list python-paho-mqtt))
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'install-daemon
+            (lambda _
+              (install-file "usbrelayd.8"
+                            (string-append #$output "/share/man/man8"))
+              (install-file "usbrelayd"
+                            (string-append #$output "/sbin"))
+              (chmod (string-append #$output "/sbin/usbrelayd") #o555)))
+          (add-after 'install-daemon 'chdir
+            (lambda _
+              (chdir "usbrelay_py"))))))))

base-commit: a76708a872e65230931f3c5c3b079d0a39d5cb84
-- 
2.48.1





Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Sat, 01 Mar 2025 23:03:02 GMT) Full text and rfc822 format available.

Notification sent to Evgeny Pisemsky <mail <at> pisemsky.site>:
bug acknowledged by developer. (Sat, 01 Mar 2025 23:03:02 GMT) Full text and rfc822 format available.

Message #16 received at 72635-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Evgeny Pisemsky <mail <at> pisemsky.site>
Cc: 72635-done <at> debbugs.gnu.org
Subject: Re: [bug#72635] [PATCH v1] gnu: Add python-usbrelay.
Date: Sat, 01 Mar 2025 23:02:17 +0000
[Message part 1 (text/plain, inline)]
Evgeny Pisemsky <mail <at> pisemsky.site> writes:

> * gnu/packages/hardware.scm (python-usbrelay): New variable.
>
> Change-Id: Icc389604a9bbc8f91fd7b00c1f5cebe3faac3e09
> ---
>  gnu/packages/hardware.scm | 27 ++++++++++++++++++++++++++-
>  1 file changed, 26 insertions(+), 1 deletion(-)

Thanks for the patch, an update synopsis and description needed adding,
otherwise it's just the name that separates this from usbrelay. I've
written something that hopefully a good start and pushed this to master
as 60942a822115b5ae790c8a63e8796809bf693e93.

Chris
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 30 Mar 2025 11:24:24 GMT) Full text and rfc822 format available.

This bug report was last modified 82 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.