GNU bug report logs -
#72635
[PATCH] gnu: Add python-usbrelay.
Previous Next
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.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 01 Mar 2025 23:02:17 +0000
with message-id <87ldtoxsli.fsf <at> cbaines.net>
and subject line Re: [bug#72635] [PATCH v1] gnu: Add python-usbrelay.
has caused the debbugs.gnu.org bug report #72635,
regarding [PATCH] gnu: Add python-usbrelay.
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
72635: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72635
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[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
[Message part 4 (message/rfc822, inline)]
[Message part 5 (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)]
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.