* [bug#31957] [PATCH] gnu: Add python-libusb1.
@ 2018-06-24 20:04 Vagrant Cascadian
2018-06-25 19:46 ` Marius Bakke
0 siblings, 1 reply; 6+ messages in thread
From: Vagrant Cascadian @ 2018-06-24 20:04 UTC (permalink / raw)
To: 31957
[-- Attachment #1.1: Type: text/plain, Size: 121 bytes --]
Add new package definition for python-libusb1, needed to upgrade
python-trezor to newer versions.
live well,
vagrant
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-python-libusb1.patch --]
[-- Type: text/x-diff, Size: 2096 bytes --]
From 282280cbaba47389f7a9c3e14eb8fe7834adbd39 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#31957] [PATCH] gnu: Add python-libusb1.
2018-06-24 20:04 [bug#31957] [PATCH] gnu: Add python-libusb1 Vagrant Cascadian
@ 2018-06-25 19:46 ` Marius Bakke
2018-06-25 20:54 ` Vagrant Cascadian
2018-06-26 5:35 ` Vagrant Cascadian
0 siblings, 2 replies; 6+ messages in thread
From: Marius Bakke @ 2018-06-25 19:46 UTC (permalink / raw)
To: Vagrant Cascadian, 31957
[-- Attachment #1: Type: text/plain, Size: 2141 bytes --]
Vagrant Cascadian <vagrant@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!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#31957] [PATCH] gnu: Add python-libusb1.
2018-06-25 19:46 ` Marius Bakke
@ 2018-06-25 20:54 ` Vagrant Cascadian
2018-06-25 21:26 ` Marius Bakke
2018-06-26 5:35 ` Vagrant Cascadian
1 sibling, 1 reply; 6+ messages in thread
From: Vagrant Cascadian @ 2018-06-25 20:54 UTC (permalink / raw)
To: Marius Bakke, 31957
[-- Attachment #1: Type: text/plain, Size: 2619 bytes --]
On 2018-06-25, Marius Bakke wrote:
> Vagrant Cascadian <vagrant@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#31957] [PATCH] gnu: Add python-libusb1.
2018-06-25 19:46 ` Marius Bakke
2018-06-25 20:54 ` Vagrant Cascadian
@ 2018-06-26 5:35 ` Vagrant Cascadian
2018-06-26 21:39 ` Marius Bakke
1 sibling, 1 reply; 6+ messages in thread
From: Vagrant Cascadian @ 2018-06-26 5:35 UTC (permalink / raw)
To: Marius Bakke, 31957
[-- Attachment #1.1: Type: text/plain, Size: 805 bytes --]
On 2018-06-25, Marius Bakke wrote:
> Vagrant Cascadian <vagrant@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
[-- Attachment #1.2: 0001-gnu-Add-python-libusb1.patch --]
[-- Type: text/x-diff, Size: 2846 bytes --]
From 088c81c4ca3a95bf51f04aec836aaedee8ab9ba8 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@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@foradis.org>
;;; Copyright © 2017 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Vagrant Cascadian <vagrant@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#31957] [PATCH] gnu: Add python-libusb1.
2018-06-26 5:35 ` Vagrant Cascadian
@ 2018-06-26 21:39 ` Marius Bakke
0 siblings, 0 replies; 6+ messages in thread
From: Marius Bakke @ 2018-06-26 21:39 UTC (permalink / raw)
To: Vagrant Cascadian, 31957
[-- Attachment #1.1: Type: text/plain, Size: 945 bytes --]
Vagrant Cascadian <vagrant@debian.org> writes:
> On 2018-06-25, Marius Bakke wrote:
>> Vagrant Cascadian <vagrant@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`):
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: Type: text/x-patch, Size: 1464 bytes --]
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]
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-06-26 21:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-24 20:04 [bug#31957] [PATCH] gnu: Add python-libusb1 Vagrant Cascadian
2018-06-25 19:46 ` Marius Bakke
2018-06-25 20:54 ` Vagrant Cascadian
2018-06-25 21:26 ` Marius Bakke
2018-06-26 5:35 ` Vagrant Cascadian
2018-06-26 21:39 ` Marius Bakke
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.