GNU bug report logs - #55518
[PATCH] gnu: Add python-gatt.

Previous Next

Package: guix-patches;

Reported by: "Wamm K. D" <jaft.r <at> outlook.com>

Date: Thu, 19 May 2022 05:27:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

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 55518 in the body.
You can then email your comments to 55518 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#55518; Package guix-patches. (Thu, 19 May 2022 05:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Wamm K. D" <jaft.r <at> outlook.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 19 May 2022 05:27:02 GMT) Full text and rfc822 format available.

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

From: "Wamm K. D" <jaft.r <at> outlook.com>
To: guix-patches <at> gnu.org
Cc: "Wamm K. D" <jaft.r <at> outlook.com>
Subject: [PATCH] gnu: Add python-gatt.
Date: Thu, 19 May 2022 00:24:07 -0500
---
This isn't the end-goal package to add but a dependency.

'Trying to add Siglo so sending this one, first; Siglo will follow.

 gnu/packages/python-xyz.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 5094ef068c..ee7850b518 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -31177,3 +31177,32 @@ (define-public python-deepmerge
      "The @code{deep-merge} Python library provides a toolset to deeply merge
 nested data structures in Python like lists and dictionaries.")
     (license license:expat)))
+
+(define python-gatt
+  (package
+    (name "python-gatt")
+    (version "0.2.7")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "gatt" version))
+              (sha256 (base32
+                       "0fjf066jixk30fr8xwfalwfnhqpr56yv0cccyypnx2qp9bi9svb2"))))
+    (inputs (list python-dbus python-pygobject))
+    (build-system python-build-system)
+    (home-page "https://github.com/getsenic/gatt-python")
+    (synopsis "Bluetooth GATT SDK for Python")
+    (description "The Bluetooth GATT SDK for Python helps you implementing and
+communicating with any Bluetooth Low Energy device that has a GATT profile.  It
+supports:
+@itemize @bullet
+@item Discovering nearby Bluetooth Low Energy devices
+@item Connecting and disconnecting devices
+@item Implementing your custom GATT profile
+@item Accessing all GATT services
+@item Accessing all GATT characteristics
+@item Reading characteristic values
+@item Writing characteristic values
+@item Subscribing for characteristic value change notifications
+@end itemize
+Currently Linux is the only platform supported by this library.")
+    (license license:expat)))
-- 
2.36.0





Information forwarded to guix-patches <at> gnu.org:
bug#55518; Package guix-patches. (Thu, 19 May 2022 05:47:02 GMT) Full text and rfc822 format available.

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

From: Jack Hill <jackhill <at> jackhill.us>
To: "Wamm K. D" <jaft.r <at> outlook.com>
Cc: 55518 <at> debbugs.gnu.org
Subject: Re: [bug#55518] [PATCH] gnu: Add python-gatt.
Date: Thu, 19 May 2022 01:46:48 -0400 (EDT)
On Thu, 19 May 2022, Wamm K. D wrote:

> ---
> This isn't the end-goal package to add but a dependency.
>
> 'Trying to add Siglo so sending this one, first; Siglo will follow.
>
> gnu/packages/python-xyz.scm | 29 +++++++++++++++++++++++++++++
> 1 file changed, 29 insertions(+)
>
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index 5094ef068c..ee7850b518 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -31177,3 +31177,32 @@ (define-public python-deepmerge
>      "The @code{deep-merge} Python library provides a toolset to deeply merge
> nested data structures in Python like lists and dictionaries.")
>     (license license:expat)))
> +
> +(define python-gatt
> +  (package
> +    (name "python-gatt")
> +    (version "0.2.7")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (pypi-uri "gatt" version))
> +              (sha256 (base32
> +                       "0fjf066jixk30fr8xwfalwfnhqpr56yv0cccyypnx2qp9bi9svb2"))))
> +    (inputs (list python-dbus python-pygobject))
> +    (build-system python-build-system)
> +    (home-page "https://github.com/getsenic/gatt-python")
> +    (synopsis "Bluetooth GATT SDK for Python")
> +    (description "The Bluetooth GATT SDK for Python helps you implementing and
> +communicating with any Bluetooth Low Energy device that has a GATT profile.  It
> +supports:
> +@itemize @bullet
> +@item Discovering nearby Bluetooth Low Energy devices
> +@item Connecting and disconnecting devices
> +@item Implementing your custom GATT profile
> +@item Accessing all GATT services
> +@item Accessing all GATT characteristics
> +@item Reading characteristic values
> +@item Writing characteristic values
> +@item Subscribing for characteristic value change notifications
> +@end itemize
> +Currently Linux is the only platform supported by this library.")
> +    (license license:expat)))

Cool! I haven't reviewed the package, but it looks straight forward, which 
is promising. However reading this description made me realize that I 
don't know what GATT means. Would it make sense to define it in the 
description (perhaps using texinfo's @acronym syntax)?

Best,
Jack




Information forwarded to guix-patches <at> gnu.org:
bug#55518; Package guix-patches. (Thu, 19 May 2022 05:58:01 GMT) Full text and rfc822 format available.

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

From: "Wamm K. D" <jaft.r <at> outlook.com>
To: 55518 <at> debbugs.gnu.org
Cc: jackhill <at> jackhill.us, "Wamm K. D" <jaft.r <at> outlook.com>
Subject: [PATCH] gnu: Add siglo.
Date: Thu, 19 May 2022 00:54:22 -0500
---
Hmmm; heh, you know, I don't either. I think it makes sense; I'll look it up
and try adding it. I may come back with questions about the @acronym syntax,
just as a heads up.

 gnu/packages/firmware.scm | 75 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)

diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index b63ad63749..1b81110c91 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe <at> gmail.com>
 ;;; Copyright © 2020, 2021, 2022 Marius Bakke <marius <at> gnu.org>
 ;;; Copyright © 2021 Petr Hodina <phodina <at> protonmail.com>
+;;; Copyright © 2022 Wamm K. D. <jaft.r <at> outlook.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -42,13 +43,19 @@ (define-module (gnu packages firmware)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages cross-base)
   #:use-module (gnu packages flex)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-crypto)
+  #:use-module (gnu packages python-web)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages pkg-config))
 
 (define-public ath9k-htc-firmware
@@ -634,3 +641,71 @@ (define-public arm-trusted-firmware-imx8mq
          ((#:make-flags flags ''())
           ;; Adding debug symbols causes the size to exceed limits.
           #~(delete "DEBUG=1" #$flags)))))))
+
+(define-public siglo
+  (package
+    (name "siglo")
+    (version "0.9.6")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url (string-append "https://github.com/alexr4535/" name "/"))
+                    (commit (string-append "v" version))))
+              (sha256 (base32
+                       "1q241465l0kjirycvhgrm5ylqll6ywqfyg2arad224v47fz7lb8g"))))
+    (build-system meson-build-system)
+    (native-inputs (list gettext-minimal
+                         `(,glib "bin")  ; for 'glib-compile-resources',
+                                         ;     'glib-compile-schemas'
+                         pkg-config
+                         `(,gtk+ "bin")  ; for gtk-update-icon-cache
+                         ))
+    (inputs (list gtk+
+                  desktop-file-utils
+                  appstream-glib  ; listed as appstream-util, in configure
+                  python
+                  python-pyxdg
+                  python-gatt
+                  python-dbus
+                  python-pygobject
+                  python-requests
+                  python-urllib3
+                  python-chardet
+                  python-certifi
+                  python-idna))
+    (arguments `(#:glib-or-gtk? #t
+                 #:phases (modify-phases %standard-phases
+                            (add-before 'configure 'remove-internet-using-test
+                              (lambda _
+                                (substitute* "data/meson.build"
+                                  (("appstream_util.found\\(\\)") "false")
+                                  (((string-append
+                                     "install_data[(]'siglo\\.service', "
+                                     "install_dir: '/etc/systemd/user/'[)]"))
+                                   ""))))
+                            (add-after 'glib-or-gtk-wrap 'python-and-gi-wrap
+                              (lambda* (#:key outputs inputs #:allow-other-keys)
+                                (wrap-program (string-append
+                                               (assoc-ref outputs "out")
+                                               "/bin/siglo")
+                                  `("GUIX_PYTHONPATH" =
+                                    ,(map
+                                      (lambda (python-input)
+                                        (string-append (cdr python-input)
+                                                       "/lib/python"
+                                                       ,(version-major+minor
+                                                         (package-version python))
+                                                       "/site-packages"))
+                                      (filter
+                                       (lambda (input)
+                                         (string-prefix? "python" (car input)))
+                                       inputs)))
+                                  `("GI_TYPELIB_PATH" =
+                                    (,(getenv "GI_TYPELIB_PATH")))))))))
+    (synopsis "GTK app to sync InfiniTime watch with PinePhone")
+    (description "Siglo is a GTK app. to sync with the InfiniTime watch via
+Bluetooth.  With a connection via Siglo, you can check the firmware version of
+your PineTime and sync the date/time.  You can, also, update the firmware and
+bootloader of the watch.")
+    (home-page "https://github.com/alexr4535/siglo")
+    (license license:mpl2.0)))
-- 
2.36.0





Information forwarded to guix-patches <at> gnu.org:
bug#55518; Package guix-patches. (Thu, 19 May 2022 06:08:01 GMT) Full text and rfc822 format available.

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

From: "Wamm K. D" <jaft.r <at> outlook.com>
To: 55518 <at> debbugs.gnu.org
Cc: jackhill <at> jackhill.us, "Wamm K. D" <jaft.r <at> outlook.com>
Subject: [PATCH] gnu: Add python-gatt.
Date: Thu, 19 May 2022 01:05:22 -0500
---
Here we go; would this work? Do I need to include what the acronym means in
every instance of @acronym or does doing so for just the first instance work?

 gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 5094ef068c..dcf1bfa9d3 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -31177,3 +31177,33 @@ (define-public python-deepmerge
      "The @code{deep-merge} Python library provides a toolset to deeply merge
 nested data structures in Python like lists and dictionaries.")
     (license license:expat)))
+
+(define python-gatt
+  (package
+    (name "python-gatt")
+    (version "0.2.7")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "gatt" version))
+              (sha256 (base32
+                       "0fjf066jixk30fr8xwfalwfnhqpr56yv0cccyypnx2qp9bi9svb2"))))
+    (inputs (list python-dbus python-pygobject))
+    (build-system python-build-system)
+    (home-page "https://github.com/getsenic/gatt-python")
+    (synopsis "Bluetooth GATT SDK for Python")
+    (description "The Bluetooth @acronym{GATT, Generic ATTribute Profile}
+@acronym{SDK, Software Development Kit} for Python helps you implementing and
+communicating with any Bluetooth Low Energy device that has a @acronym{GATT}
+profile.  It supports:
+@itemize @bullet
+@item Discovering nearby Bluetooth Low Energy devices
+@item Connecting and disconnecting devices
+@item Implementing your custom @acronym{GATT} profile
+@item Accessing all @acronym{GATT} services
+@item Accessing all @acronym{GATT} characteristics
+@item Reading characteristic values
+@item Writing characteristic values
+@item Subscribing for characteristic value change notifications
+@end itemize
+Currently, Linux is the only platform supported by this library.")
+    (license license:expat)))
-- 
2.36.0





Information forwarded to guix-patches <at> gnu.org:
bug#55518; Package guix-patches. (Thu, 19 May 2022 13:25:02 GMT) Full text and rfc822 format available.

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

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: guix-patches <at> gnu.org, "Wamm K. D" <jaft.r <at> outlook.com>,
 55518 <at> debbugs.gnu.org
Cc: jackhill <at> jackhill.us
Subject: Re: [bug#55518] [PATCH] gnu: Add python-gatt.
Date: Thu, 19 May 2022 13:24:38 +0000
On 19 May 2022 06:05:22 UTC, "Wamm K. D" <jaft.r <at> outlook.com> wrote:
>---
>Do I need to include what the acronym means in
>every instance of @acronym or does doing so for just the first instance work?

Just the first occurence in each description.  At least how Guix renders Texinfo (simple & stupid), it would repeat the meaning in brackets every single time.  Not what you want.



Kind regards,

T G-R

Sent on the go.  Excuse or enjoy my brevity.




Information forwarded to guix-patches <at> gnu.org:
bug#55518; Package guix-patches. (Thu, 19 May 2022 13:25:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#55518; Package guix-patches. (Sun, 22 May 2022 06:45:02 GMT) Full text and rfc822 format available.

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

From: Jaft <jaft.r <at> outlook.com>
To: "guix-patches <at> gnu.org" <guix-patches <at> gnu.org>, 
 "55518 <at> debbugs.gnu.org" <55518 <at> debbugs.gnu.org>, 
 Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: "jackhill <at> jackhill.us" <jackhill <at> jackhill.us>
Subject: Re: [bug#55518] [PATCH] gnu: Add python-gatt.
Date: Sun, 22 May 2022 06:44:45 +0000 (UTC)
> On Thursday, May 19, 2022, 08:24:43 AM CDT, Tobias Geerinckx-Rice <me <at> tobias.gr> wrote: 
>
>
>
>
>
> On 19 May 2022 06:05:22 UTC, "Wamm K. D" <jaft.r <at> outlook.com> wrote:
>
> >---
> >Do I need to include what the acronym means in
> >every instance of @acronym or does doing so for just the first instance work?
>
>
> Just the first occurence in each description.  At least how Guix renders Texinfo (simple & stupid), it would repeat the meaning in brackets every single time.  Not what you want.

Gotcha; that's what I was figuring but wanted to double check. Thanks a ton for confirming!

Then I think the necessary changes have been made, Jack; lemme know if there's any other adjustments I ought to make.




Information forwarded to guix-patches <at> gnu.org:
bug#55518; Package guix-patches. (Sun, 22 May 2022 06:50:02 GMT) Full text and rfc822 format available.

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Fri, 27 May 2022 22:03:02 GMT) Full text and rfc822 format available.

Notification sent to "Wamm K. D" <jaft.r <at> outlook.com>:
bug acknowledged by developer. (Fri, 27 May 2022 22:03:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: "Wamm K. D" <jaft.r <at> outlook.com>
Cc: 55518-done <at> debbugs.gnu.org, jackhill <at> jackhill.us
Subject: Re: bug#55518: [PATCH] gnu: Add python-gatt.
Date: Sat, 28 May 2022 00:02:35 +0200
[Message part 1 (text/plain, inline)]
Hi,

I added a commit log and applied with the changes below, as suggested by
Tobias (for the description).

The inputs are propagated because, for instance, the code reads:

--8<---------------cut here---------------start------------->8---
try:
    import dbus
    import dbus.mainloop.glib
except ImportError:
    import sys
    print("Module 'dbus' not found")
    print("Please run: sudo apt-get install python3-dbus")
    print("See also: https://github.com/getsenic/gatt-python#installing-gatt-sdk-for-python")
    sys.exit(1)
--8<---------------cut here---------------end--------------->8---

Thus, if you install python-gatt in a profile, python-dbus should be
propagated as well so it “just works”.

Thanks,
Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d706906a9d..fe1896efca 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -31806,32 +31806,35 @@ (define-public python-srt
 composing subtitles in the SRT file format.")
     (license license:expat)))
 
-(define python-gatt
+(define-public python-gatt
   (package
     (name "python-gatt")
     (version "0.2.7")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "gatt" version))
-              (sha256 (base32
-                       "0fjf066jixk30fr8xwfalwfnhqpr56yv0cccyypnx2qp9bi9svb2"))))
-    (inputs (list python-dbus python-pygobject))
+              (sha256
+               (base32
+                "0fjf066jixk30fr8xwfalwfnhqpr56yv0cccyypnx2qp9bi9svb2"))))
+    (propagated-inputs (list python-dbus python-pygobject))
     (build-system python-build-system)
     (home-page "https://github.com/getsenic/gatt-python")
     (synopsis "Bluetooth GATT SDK for Python")
     (description "The Bluetooth @acronym{GATT, Generic ATTribute Profile}
-@acronym{SDK, Software Development Kit} for Python helps you implementing and
-communicating with any Bluetooth Low Energy device that has a @acronym{GATT}
+@acronym{SDK, Software Development Kit} for Python helps you implement and
+communicate with any Bluetooth Low Energy device that has a GATT
 profile.  It supports:
+
 @itemize @bullet
 @item Discovering nearby Bluetooth Low Energy devices
 @item Connecting and disconnecting devices
-@item Implementing your custom @acronym{GATT} profile
-@item Accessing all @acronym{GATT} services
-@item Accessing all @acronym{GATT} characteristics
+@item Implementing your custom GATT profile
+@item Accessing all GATT services
+@item Accessing all GATT characteristics
 @item Reading characteristic values
 @item Writing characteristic values
 @item Subscribing for characteristic value change notifications
 @end itemize
+
 Currently, Linux is the only platform supported by this library.")
     (license license:expat)))

Information forwarded to guix-patches <at> gnu.org:
bug#55518; Package guix-patches. (Mon, 30 May 2022 02:53:01 GMT) Full text and rfc822 format available.

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

From: "Wamm K. D." <jaft.r <at> outlook.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 55518-done <at> debbugs.gnu.org, jackhill <at> jackhill.us
Subject: Re: bug#55518: [PATCH] gnu: Add python-gatt.
Date: Sun, 29 May 2022 21:52:10 -0500
On Fri. (May 27, 2022) at 06:02:45 PM -04, Ludovic Courtès <ludo <at> gnu.org> wrote:
> Hi,
>
> I added a commit log and applied with the changes below, as suggested by
> Tobias (for the description).

…ah; heh, that was definitely not how I'd read his suggestion. I thought
~@acronym~ was used in every case, with the full acronym spelled out
only in first case, so thought I'd gotten it right in my last
patch. Sorry about that.

> The inputs are propagated because, for instance, the code reads:
>
> try:
>     import dbus
>     import dbus.mainloop.glib
> except ImportError:
>     import sys
>     print("Module 'dbus' not found")
>     print("Please run: sudo apt-get install python3-dbus")
>     print("See also: https://github.com/getsenic/gatt-python#installing-gatt-sdk-for-python")
>     sys.exit(1)
>
> Thus, if you install python-gatt in a profile, python-dbus should be
> propagated as well so it “just works”.

Mmm; O. K. That makes sense. Thanks a ton for explaining, Ludo; it's
super appreciated.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 27 Jun 2022 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 357 days ago.

Previous Next


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