GNU bug report logs -
#31957
[PATCH] gnu: Add python-libusb1.
Previous Next
Reported by: Vagrant Cascadian <vagrant <at> debian.org>
Date: Sun, 24 Jun 2018 20:05:02 UTC
Severity: normal
Tags: patch
Done: Marius Bakke <mbakke <at> fastmail.com>
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 31957 in the body.
You can then email your comments to 31957 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#31957
; Package
guix-patches
.
(Sun, 24 Jun 2018 20:05:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Vagrant Cascadian <vagrant <at> debian.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sun, 24 Jun 2018 20:05:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Add new package definition for python-libusb1, needed to upgrade
python-trezor to newer versions.
live well,
vagrant
[0001-gnu-Add-python-libusb1.patch (text/x-diff, inline)]
From 282280cbaba47389f7a9c3e14eb8fe7834adbd39 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant <at> debian.org>
Date: Sun, 24 Jun 2018 19:20:47 +0000
Subject: [PATCH] gnu: Add python-libusb1.
* gnu/packages/libusb.scm (python-libusb1): New variable.
---
gnu/packages/libusb.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index 62c936c19..9fa2d816a 100644
--- a/gnu/packages/libusb.scm
+++ b/gnu/packages/libusb.scm
@@ -214,6 +214,44 @@ with usb4java.")
implementing @code{javax.usb} (JSR-80).")
(license expat)))
+(define-public python-libusb1
+ (package
+ (name "python-libusb1")
+ (version "1.6.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "libusb1" version))
+ (sha256
+ (base32
+ "03b7xrz8vqg8w0za5r503jhcmbd1ls5610jcja1rqz833nf0v4wc"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:modules ((srfi srfi-1)
+ (srfi srfi-26)
+ (guix build utils)
+ (guix build python-build-system))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-libusb-reference
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "usb1/libusb1.py"
+ (("libusb_path = ctypes.util.find_library\\(base_name\\)")
+ (string-append
+ "libusb_path = \""
+ (find (negate symbolic-link?)
+ (find-files (assoc-ref inputs "libusb")
+ "^libusb.*\\.so\\..*"))
+ "\"")))
+ #t)))))
+ (inputs `(("libusb" ,libusb)))
+ (home-page
+ "http://github.com/vpelletier/python-libusb1")
+ (synopsis "Pure-python wrapper for libusb-1.0")
+ (description
+ "Pure-python wrapper for libusb-1.0")
+ (license lgpl2.1+)))
+
(define-public python-pyusb
(package
(name "python-pyusb")
--
2.11.0
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31957
; Package
guix-patches
.
(Mon, 25 Jun 2018 19:47:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 31957 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Vagrant Cascadian <vagrant <at> debian.org> writes:
> Add new package definition for python-libusb1, needed to upgrade
> python-trezor to newer versions.
Thanks! I have some minor nitpicks:
[...]
> * gnu/packages/libusb.scm (python-libusb1): New variable.
Can you also add yourself to the copyright header in this file?
[...]
> +(define-public python-libusb1
> + (package
> + (name "python-libusb1")
> + (version "1.6.4")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (pypi-uri "libusb1" version))
> + (sha256
> + (base32
> + "03b7xrz8vqg8w0za5r503jhcmbd1ls5610jcja1rqz833nf0v4wc"))))
> + (build-system python-build-system)
> + (arguments
> + `(#:modules ((srfi srfi-1)
> + (srfi srfi-26)
Is srfi-26 actually used here?
> + (guix build utils)
> + (guix build python-build-system))
> + #:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'fix-libusb-reference
> + (lambda* (#:key inputs #:allow-other-keys)
> + (substitute* "usb1/libusb1.py"
> + (("libusb_path = ctypes.util.find_library\\(base_name\\)")
> + (string-append
> + "libusb_path = \""
> + (find (negate symbolic-link?)
> + (find-files (assoc-ref inputs "libusb")
> + "^libusb.*\\.so\\..*"))
> + "\"")))
> + #t)))))
> + (inputs `(("libusb" ,libusb)))
> + (home-page
> + "http://github.com/vpelletier/python-libusb1")
This line break is unnecessary :-)
> + (synopsis "Pure-python wrapper for libusb-1.0")
> + (description
> + "Pure-python wrapper for libusb-1.0")
This description is rather thin. Can you try to make it into one or
more full sentences?
> + (license lgpl2.1+)))
I noticed the source contains GPL2 in COPYING, and LGPL2.1 as
"COPYING.LESSER". Can you make sure we don't install the former?
Can you send an updated patch? Thanks in advance!
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31957
; Package
guix-patches
.
(Mon, 25 Jun 2018 20:55:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 31957 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 2018-06-25, Marius Bakke wrote:
> Vagrant Cascadian <vagrant <at> debian.org> writes:
>
>> Add new package definition for python-libusb1, needed to upgrade
>> python-trezor to newer versions.
>
> Thanks! I have some minor nitpicks:
>
> [...]
>
>> * gnu/packages/libusb.scm (python-libusb1): New variable.
>
> Can you also add yourself to the copyright header in this file?
Sure.
>> +(define-public python-libusb1
>> + (package
>> + (name "python-libusb1")
>> + (version "1.6.4")
>> + (source
>> + (origin
>> + (method url-fetch)
>> + (uri (pypi-uri "libusb1" version))
>> + (sha256
>> + (base32
>> + "03b7xrz8vqg8w0za5r503jhcmbd1ls5610jcja1rqz833nf0v4wc"))))
>> + (build-system python-build-system)
>> + (arguments
>> + `(#:modules ((srfi srfi-1)
>> + (srfi srfi-26)
>
> Is srfi-26 actually used here?
No idea, I admittedly cargo-culted this from python-pyusb...
fix-libusb-reference didn't work until I added the modules block, and I
didn't narrow-down which of the specific modules were actually needed.
>> + (guix build utils)
>> + (guix build python-build-system))
>> + #:phases
>> + (modify-phases %standard-phases
>> + (add-after 'unpack 'fix-libusb-reference
>> + (lambda* (#:key inputs #:allow-other-keys)
>> + (substitute* "usb1/libusb1.py"
>> + (("libusb_path = ctypes.util.find_library\\(base_name\\)")
>> + (string-append
>> + "libusb_path = \""
>> + (find (negate symbolic-link?)
>> + (find-files (assoc-ref inputs "libusb")
>> + "^libusb.*\\.so\\..*"))
>> + "\"")))
>> + #t)))))
>> + (inputs `(("libusb" ,libusb)))
>> + (home-page
>> + "http://github.com/vpelletier/python-libusb1")
>
> This line break is unnecessary :-)
Ok.
>> + (synopsis "Pure-python wrapper for libusb-1.0")
>> + (description
>> + "Pure-python wrapper for libusb-1.0")
>
> This description is rather thin. Can you try to make it into one or
> more full sentences?
Will try.
>> + (license lgpl2.1+)))
>
> I noticed the source contains GPL2 in COPYING, and LGPL2.1 as
> "COPYING.LESSER". Can you make sure we don't install the former?
I was a bit confused by that, but looking at all the actual code, it
only appears to be LGPL2.1. So you're saying to explicitly remove
COPYING from the package?
> Can you send an updated patch? Thanks in advance!
Sure. Thanks for the review!
live well,
vagrant
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31957
; Package
guix-patches
.
(Mon, 25 Jun 2018 21:27:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 31957 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Vagrant Cascadian <vagrant <at> debian.org> writes:
>>> + (license lgpl2.1+)))
>>
>> I noticed the source contains GPL2 in COPYING, and LGPL2.1 as
>> "COPYING.LESSER". Can you make sure we don't install the former?
>
> I was a bit confused by that, but looking at all the actual code, it
> only appears to be LGPL2.1. So you're saying to explicitly remove
> COPYING from the package?
Yes, it seems COPYING is simply a leftover, so I'd prefer not to install
it somehow (e.g. by overriding the 'install-license-files' phase).
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31957
; Package
guix-patches
.
(Tue, 26 Jun 2018 05:37:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 31957 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 2018-06-25, Marius Bakke wrote:
> Vagrant Cascadian <vagrant <at> debian.org> writes:
>
>> Add new package definition for python-libusb1, needed to upgrade
>> python-trezor to newer versions.
>
> Thanks! I have some minor nitpicks:
...
> Can you send an updated patch? Thanks in advance!
Updated patch attached:
- Add myself to copyright headers
- Drop unused srfi-26
- Remove needless line break
- Flesh out description a bit...
- Remove COPYING file, which didn't match the licensing of the files
The removal of COPYING was pretty much a shotgun-style approach, but I
couldn't figure out how to do a more surgical removal, and there weren't
any other COPYING files in the source.
The description could probably be further improved... but that's as far
as I got for now... :)
live well,
vagrant
[0001-gnu-Add-python-libusb1.patch (text/x-diff, inline)]
From 088c81c4ca3a95bf51f04aec836aaedee8ab9ba8 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant <at> debian.org>
Date: Tue, 26 Jun 2018 05:22:48 +0000
Subject: [PATCH] gnu: Add python-libusb1.
* gnu/packages/libusb.scm (python-libusb1): New variable.
---
gnu/packages/libusb.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index 62c936c19..39814bc90 100644
--- a/gnu/packages/libusb.scm
+++ b/gnu/packages/libusb.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2016 Theodoros Foradis <theodoros <at> foradis.org>
;;; Copyright © 2017 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright © 2018 Vagrant Cascadian <vagrant <at> debian.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -214,6 +215,49 @@ with usb4java.")
implementing @code{javax.usb} (JSR-80).")
(license expat)))
+(define-public python-libusb1
+ (package
+ (name "python-libusb1")
+ (version "1.6.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "libusb1" version))
+ (sha256
+ (base32
+ "03b7xrz8vqg8w0za5r503jhcmbd1ls5610jcja1rqz833nf0v4wc"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:modules ((srfi srfi-1)
+ (guix build utils)
+ (guix build python-build-system))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'install-license-files 'remove-incorrect-license
+ (lambda* (#:key out #:allow-other-keys)
+ ;; Was reliscensed to LGPL 2.1+, but old COPYING file still left
+ ;; in source. Remove it so it does not get installed.
+ (delete-file-recursively "COPYING")
+ #t))
+ (add-after 'unpack 'fix-libusb-reference
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "usb1/libusb1.py"
+ (("libusb_path = ctypes.util.find_library\\(base_name\\)")
+ (string-append
+ "libusb_path = \""
+ (find (negate symbolic-link?)
+ (find-files (assoc-ref inputs "libusb")
+ "^libusb.*\\.so\\..*"))
+ "\"")))
+ #t)))))
+ (inputs `(("libusb" ,libusb)))
+ (home-page "http://github.com/vpelletier/python-libusb1")
+ (synopsis "Pure-python wrapper for libusb-1.0")
+ (description "Libusb is a library that gives applications easy access to
+USB devices on various operating systems. This is a python wrapper for
+acessing libusb-1.0")
+ (license lgpl2.1+)))
+
(define-public python-pyusb
(package
(name "python-pyusb")
--
2.11.0
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#31957
; Package
guix-patches
.
(Tue, 26 Jun 2018 21:40:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 31957 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Vagrant Cascadian <vagrant <at> debian.org> writes:
> On 2018-06-25, Marius Bakke wrote:
>> Vagrant Cascadian <vagrant <at> debian.org> writes:
>>
>>> Add new package definition for python-libusb1, needed to upgrade
>>> python-trezor to newer versions.
>>
>> Thanks! I have some minor nitpicks:
> ...
>> Can you send an updated patch? Thanks in advance!
>
> Updated patch attached:
>
> - Add myself to copyright headers
> - Drop unused srfi-26
> - Remove needless line break
> - Flesh out description a bit...
> - Remove COPYING file, which didn't match the licensing of the files
>
> The removal of COPYING was pretty much a shotgun-style approach, but I
> couldn't figure out how to do a more surgical removal, and there weren't
> any other COPYING files in the source.
>
> The description could probably be further improved... but that's as far
> as I got for now... :)
Thanks! Applied with these cosmetic changes (mostly to please `guix lint`):
[Message part 2 (text/x-patch, inline)]
1 file changed, 5 insertions(+), 5 deletions(-)
gnu/packages/libusb.scm | 10 +++++-----
modified gnu/packages/libusb.scm
@@ -235,9 +235,9 @@ implementing @code{javax.usb} (JSR-80).")
(modify-phases %standard-phases
(add-before 'install-license-files 'remove-incorrect-license
(lambda* (#:key out #:allow-other-keys)
- ;; Was reliscensed to LGPL 2.1+, but old COPYING file still left
+ ;; Was relicensed to LGPL 2.1+, but old COPYING file still left
;; in source. Remove it so it does not get installed.
- (delete-file-recursively "COPYING")
+ (delete-file "COPYING")
#t))
(add-after 'unpack 'fix-libusb-reference
(lambda* (#:key inputs #:allow-other-keys)
@@ -251,11 +251,11 @@ implementing @code{javax.usb} (JSR-80).")
"\"")))
#t)))))
(inputs `(("libusb" ,libusb)))
- (home-page "http://github.com/vpelletier/python-libusb1")
+ (home-page "https://github.com/vpelletier/python-libusb1")
(synopsis "Pure-python wrapper for libusb-1.0")
(description "Libusb is a library that gives applications easy access to
-USB devices on various operating systems. This is a python wrapper for
-acessing libusb-1.0")
+USB devices on various operating systems. This package provides a Python
+wrapper for accessing libusb-1.0.")
(license lgpl2.1+)))
(define-public python-pyusb
[back]
[signature.asc (application/pgp-signature, inline)]
Reply sent
to
Marius Bakke <mbakke <at> fastmail.com>
:
You have taken responsibility.
(Tue, 26 Jun 2018 21:54:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Vagrant Cascadian <vagrant <at> debian.org>
:
bug acknowledged by developer.
(Tue, 26 Jun 2018 21:54:03 GMT)
Full text and
rfc822 format available.
Message #25 received at 31957-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Vagrant Cascadian <vagrant <at> debian.org> writes:
> On 2018-06-25, Marius Bakke wrote:
>> Vagrant Cascadian <vagrant <at> debian.org> writes:
>>>> According to COPYING, this software is actually "octuple-licensed":
>>>>
>>>> * CC0 Universal 1.0 - http://creativecommons.org/publicdomain/zero/1.0
>>>> * Unlicense — http://unlicense.org/
>>>> * WTFPL Version 2 - http://www.wtfpl.net/
>>>> * Apache Public License 2.0 - https://www.apache.org/licenses/LICENSE-2.0
>>>> * OpenSSL License - https://www.openssl.org/source/license.html
>>>> * MIT License - https://opensource.org/licenses/MIT
>>>> * The BSD 3-Clause License - https://opensource.org/licenses/BSD-3-Clause
>>>> * ISC License - https://opensource.org/licenses/ISC
>>>>
>>>> Can you add each of these, along with an explaning comment?
>>>
>>> And all of those are merely fallback licenses to the author's intention
>>> of public domain... and in the files themselves (pyblake2module.c,
>>> setup.py), they only reference:
>>>
>>> http://creativecommons.org/publicdomain/zero/1.0
>>>
>>> But if it's more appropriate for guix to list all possible licenses,
>>> sure. :)
>>
>> Right. I missed the top comment of the COPYING file[0], which dedicates
>> the software to the public domain. But it also says that you are free
>> to choose any of the others at your discretion.
>>
>> So I think CC0 is appropriate, but please add a comment explaning the
>> situation. Thanks!
>>
>> [0] https://github.com/dchest/pyblake2/blob/master/COPYING
>
> Updated patch:
> - fixed commit message
> - moved to python-crypto.scm
> - removed needless linebreak
> - updated description
> - updated licensing to public-domain/cc0
> - clarified additional licensing in comments
>
> Hopefully that covers everything.
Thank you!
I shortened the description a bit while adding @code{} notations where
appropriate, and also added a copyright statement for you. Hope that
was okay :-)
I also moved the package so it wasn't squeezed between the Python3 and
Python2 variants of python-py-bcrypt.
(...and closing the previous patch bug while at it...)
Pushed as e64088f0b521145286bfe3f028699e418baf4832!
[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
.
(Wed, 25 Jul 2018 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 324 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.