GNU bug report logs - #61464
[PATCH 0/2]: gnu python-construct: Update to 2.10.68.

Previous Next

Package: guix-patches;

Reported by: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Date: Sun, 12 Feb 2023 23:49:01 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

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 61464 in the body.
You can then email your comments to 61464 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#61464; Package guix-patches. (Sun, 12 Feb 2023 23:49:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 12 Feb 2023 23:49:02 GMT) Full text and rfc822 format available.

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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 0/2]: gnu python-construct: Update to 2.10.68.
Date: Sun, 12 Feb 2023 23:48:32 +0000
Hi Guix!

Inspired by FOSDEM's talk about gallia
https://github.com/Fraunhofer-AISEC/gallia - pentesting framework, I'd tried to
pack it but some of the Guix's inputs are outdated and some are above
allowed. gallia v1.1.4 requires Python 3.11+ which is not available in Guix
right now so I'm about to pack the closed possible to satisfy requirements
version - v1.0.3.

This patch series bumps python-construct to the latest and fixes build of
depended python-capablerobot-usbhub with it's upgrade to the latest as well.

Attempt to insure nothing broken with this update:
> ./pre-inst-env guix build $(./pre-inst-env guix refresh --list-dependent python-construct|awk -F: '{print $2}')
> /gnu/store/ycvfwhxnj13xsyrqngm9lplk293diw2p-gr-satellites-4.6.0
> /gnu/store/8bw6nbpyiywh4by7780fc8rxw0mg6fvh-secrets-6.5
> /gnu/store/6fxa0f70gwi7vl0pqa0b5rkam7wl9cws-python-capablerobot-usbhub-0.5.0
> /gnu/store/fq6ihigrjmr6ig3yn5w6hl41wrz9fg6w-electron-cash-4.2.12
> /gnu/store/dlzgq2j1idjapipl60vjkzbimv05lhi9-trezor-agent-0.14.4
> /gnu/store/9z1wzmbca830flrlbd97rahvv37y1hjx-python-miio-0.5.11

Sharlatan Hellseher (2):
  gnu: python-construct: Update to 2.10.68.
  gnu: python-capablerobot-usbhub: Update to 0.5.0.

 gnu/packages/libusb.scm     | 34 ++++++++++++++++++++++++----------
 gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++--------
 2 files changed, 46 insertions(+), 18 deletions(-)


base-commit: 2b1383c0a2f79117103b142440c64f6a751d545d
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61464; Package guix-patches. (Sun, 12 Feb 2023 23:51:02 GMT) Full text and rfc822 format available.

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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 61464 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 2/2] gnu: python-capablerobot-usbhub: Update to 0.5.0.
Date: Sun, 12 Feb 2023 23:49:57 +0000
* gnu/packages/libusb.scm (python-capablerobot-usbhub): Fix build and update to 0.5.0.
  [source]: Use git checkout which allows to pass build the package.
  [build-system]: Use pyproject-build-system.
  [arguments]{tests}: Disable them as not provided.
  [phases]{use-poetry-core}: New phase.
  [phases]{install-udev-rules}: Remove trailing #t from lambda.
  [native-inputs]: Add python-poetry-core.
  [propagated-inputs]: python-click -> python-click-7, python-pyyaml -> python-pyyaml-5.
---
 gnu/packages/libusb.scm | 34 ++++++++++++++++++++++++----------
 1 file changed, 24 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index d46f1f8cc2..468f7b1753 100644
--- a/gnu/packages/libusb.scm
+++ b/gnu/packages/libusb.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2020 Christopher Howard <christopher <at> librehacker.com>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv <at> posteo.net>
 ;;; Copyright © 2022 Jacob Hrbek <kreyren <at> rixotstudio.cz>
+;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -40,6 +41,7 @@ (define-module (gnu packages libusb)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system pyproject)
   #:use-module (guix build-system python)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages compression)
@@ -51,6 +53,7 @@ (define-module (gnu packages libusb)
   #:use-module (gnu packages mp3)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages tls)
@@ -310,18 +313,28 @@ (define-public python-pyusb
 (define-public python-capablerobot-usbhub
   (package
     (name "python-capablerobot-usbhub")
-    (version "0.2.7")
+    (version "0.5.0")
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "capablerobot_usbhub" version))
+       ;; PyPI tarball fails to build.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/CapableRobot/CapableRobot_USBHub_Driver")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
-        (base32
-         "1priic4iq2vn1rc711kzxwhxrwa508rkxrr193qdz2lw26kdhvix"))))
-    (build-system python-build-system)
+        (base32 "1nfd12612z9a9hby5dxg7lfqw5jcv3wcyqqagbg5izragni646mc"))))
+    (build-system pyproject-build-system)
     (arguments
-     `(#:phases
+     `(#:tests? #f ; No tests provided.
+       #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'use-poetry-core
+           (lambda _
+             ;; Patch to use the core poetry API.
+             (substitute* "pyproject.toml"
+               (("poetry.masonry.api")
+                "poetry.core.masonry.api"))))
          (add-after 'install 'install-udev-rules
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
@@ -329,10 +342,11 @@ (define-public python-capablerobot-usbhub
                (copy-file "50-capablerobot-usbhub.rules"
                           (string-append out
                                          "/lib/udev/rules.d/"
-                                         "50-capablerobot-usbhub.rules"))
-               #t))))))
+                                         "50-capablerobot-usbhub.rules"))))))))
+    (native-inputs
+     (list python-poetry-core))
     (propagated-inputs
-     (list python-click python-construct python-pyusb python-pyyaml))
+     (list python-click-7 python-construct python-pyusb python-pyyaml-5))
     (home-page
      "https://github.com/CapableRobot/CapableRobot_USBHub_Driver")
     (synopsis
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61464; Package guix-patches. (Sun, 12 Feb 2023 23:51:02 GMT) Full text and rfc822 format available.

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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 61464 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 1/2] gnu: python-construct: Update to 2.10.68.
Date: Sun, 12 Feb 2023 23:49:56 +0000
* gnu/packages/python-xyz.scm (python-construct): Update to 2.10.68.
  [source]: Use git checkout over PyPI to enable tests.
  [arguments]{tests}: Enable them with custom phase.
  [native-inputs]: Add python-pytest, python-pytest-benchmark.
  [propagated-inputs]: Remove python-extras. Add python-cloudpickle, python-lz4.
---
 gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++--------
 1 file changed, 22 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 445f5a787d..1f13e3ba28 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -94,7 +94,7 @@
 ;;; Copyright © 2020, 2021 Zheng Junjie <873216071 <at> qq.com>
 ;;; Copyright © 2020 EuAndreh <eu <at> euandre.org>
 ;;; Copyright © 2021, 2022 Morgan Smith <Morgan.J.Smith <at> outlook.com>
-;;; Copyright © 2021, 2022 Sharlatan Hellseher <sharlatanus <at> gmail.com>
+;;; Copyright © 2021-2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
 ;;; Copyright © 2021 Ellis Kenyő <me <at> elken.dev>
 ;;; Copyright © 2021 LibreMiami <packaging-guix <at> libremiami.org>
 ;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
@@ -24432,19 +24432,33 @@ (define-public python-attr
 (define-public python-construct
   (package
     (name "python-construct")
-    (version "2.10.56")
+    (version "2.10.68")
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "construct" version))
+       ;; There are no tests in the PyPI tarball.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/construct/construct")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
-        (base32
-         "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
+        (base32 "1b59kq8scxhn9afqgmksk45n53gawylqm8gw3k0vmljg274xi7vf"))))
     (build-system python-build-system)
     (arguments
-     `(#:tests? #f)) ; No tests exist.
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (replace 'check
+                 (lambda* (#:key tests? #:allow-other-keys)
+                   (when tests?
+                     (invoke "pytest" "-v" "tests/")))))))
+    (native-inputs
+     (list python-pytest python-pytest-benchmark))
     (propagated-inputs
-     (list python-extras python-arrow python-numpy python-ruamel.yaml))
+     (list python-arrow
+           python-cloudpickle
+           python-lz4
+           python-numpy
+           python-ruamel.yaml))
     (home-page "https://construct.readthedocs.io")
     (synopsis "Declarative and symmetrical parser and builder for binary data")
     (description
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61464; Package guix-patches. (Wed, 15 Feb 2023 15:59:03 GMT) Full text and rfc822 format available.

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

From: zimoun <zimon.toutoune <at> gmail.com>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>, 61464 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: Re: [bug#61464] [PATCH 2/2] gnu: python-capablerobot-usbhub: Update
 to 0.5.0.
Date: Wed, 15 Feb 2023 12:41:27 +0100
Hi,

Thanks!  Enough green: https://qa.guix.gnu.org/issue/61464 :-)  LGTM.


On Sun, 12 Feb 2023 at 23:49, Sharlatan Hellseher <sharlatanus <at> gmail.com> wrote:

> * gnu/packages/libusb.scm (python-capablerobot-usbhub): Fix build and update to 0.5.0.
>   [source]: Use git checkout which allows to pass build the package.
>   [build-system]: Use pyproject-build-system.
>   [arguments]{tests}: Disable them as not provided.
>   [phases]{use-poetry-core}: New phase.
>   [phases]{install-udev-rules}: Remove trailing #t from lambda.
>   [native-inputs]: Add python-poetry-core.
>   [propagated-inputs]: python-click -> python-click-7, python-pyyaml -> python-pyyaml-5.

For what it is worth and I am not an expert with ChangeLog style; I
think it should be without extra space and ’->’ probably with plain
words.

--8<---------------cut here---------------start------------->8---
* gnu/packages/libusb.scm (python-capablerobot-usbhub): Fix build and update to 0.5.0.
[source]: Use git checkout which allows to pass build the package.
[build-system]: Use pyproject-build-system.
[arguments]{tests}: Disable them as not provided.
[phases]{use-poetry-core}: New phase.
[phases]{install-udev-rules}: Remove trailing #t from lambda.
[native-inputs]: Add python-poetry-core.
[propagated-inputs]: Replace python-pyyaml-7 and python-pyyaml-5 by
python-click and python-pyyaml.
--8<---------------cut here---------------end--------------->8---


Cheers,
simon




Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Mon, 20 Feb 2023 13:04:01 GMT) Full text and rfc822 format available.

Notification sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
bug acknowledged by developer. (Mon, 20 Feb 2023 13:04:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 61464-done <at> debbugs.gnu.org
Subject: Re: [bug#61464] [PATCH 0/2]: gnu python-construct: Update to 2.10.68.
Date: Mon, 20 Feb 2023 14:03:36 +0100
Hello,

Sharlatan Hellseher <sharlatanus <at> gmail.com> writes:

> This patch series bumps python-construct to the latest and fixes build of
> depended python-capablerobot-usbhub with it's upgrade to the latest as
> well.

Applied. Thanks to you and zimoun.

Regards,
-- 
Nicolas Goaziou




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

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

Previous Next


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