[PATCH 0/2]: gnu python-construct: Update to 2.10.68.

  • Done
  • quality assurance status badge
Details
3 participants
  • Nicolas Goaziou
  • Sharlatan Hellseher
  • zimoun
Owner
unassigned
Submitted by
Sharlatan Hellseher
Severity
normal

Debbugs page

Sharlatan Hellseher wrote 2 years ago
(address . guix-patches@gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20230212234832.25245-1-sharlatanus@gmail.com
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:
Toggle quote (8 lines)
> ./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
Sharlatan Hellseher wrote 2 years ago
[PATCH 2/2] gnu: python-capablerobot-usbhub: Update to 0.5.0.
(address . 61464@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20230212234957.25326-2-sharlatanus@gmail.com
* 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(-)

Toggle diff (81 lines)
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@librehacker.com>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2022 Jacob Hrbek <kreyren@rixotstudio.cz>
+;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus@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
Sharlatan Hellseher wrote 2 years ago
[PATCH 1/2] gnu: python-construct: Update to 2.10.68.
(address . 61464@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20230212234957.25326-1-sharlatanus@gmail.com
* 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(-)

Toggle diff (56 lines)
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@qq.com>
;;; Copyright © 2020 EuAndreh <eu@euandre.org>
;;; Copyright © 2021, 2022 Morgan Smith <Morgan.J.Smith@outlook.com>
-;;; Copyright © 2021, 2022 Sharlatan Hellseher <sharlatanus@gmail.com>
+;;; Copyright © 2021-2023 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2021 Ellis KenyƑ <me@elken.dev>
;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
;;; Copyright © 2021 Xinglu Chen <public@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
zimoun wrote 2 years ago
Re: [bug#61464] [PATCH 2/2] gnu: python-capablerobot-usbhub: Update to 0.5.0.
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
867cwjdul4.fsf@gmail.com
Hi,

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


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

Toggle quote (9 lines)
> * 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.

Toggle snippet (12 lines)
* 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.


Cheers,
simon
Nicolas Goaziou wrote 2 years ago
Re: [bug#61464] [PATCH 0/2]: gnu python-construct: Update to 2.10.68.
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 61464-done@debbugs.gnu.org)
875ybwsd3r.fsf@nicolasgoaziou.fr
Hello,

Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (4 lines)
> 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
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 61464@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 61464
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help