[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
14/17: gnu: Add python-pyzbar.
From: |
guix-commits |
Subject: |
14/17: gnu: Add python-pyzbar. |
Date: |
Sun, 18 Oct 2020 18:16:51 -0400 (EDT) |
mbakke pushed a commit to branch master
in repository guix.
commit 2f115f56faae949a6e3ed6baee57fd4472539b72
Author: Vinicius Monego <monego@posteo.net>
AuthorDate: Mon Oct 12 21:53:24 2020 -0300
gnu: Add python-pyzbar.
* gnu/packages/python-xyz.scm (python-pyzbar): New variable.
Signed-off-by: Marius Bakke <marius@gnu.org>
---
gnu/packages/python-xyz.scm | 53 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 42352aa..f95f779 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -108,6 +108,7 @@
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
#:use-module (gnu packages adns)
+ #:use-module (gnu packages aidc)
#:use-module (gnu packages attr)
#:use-module (gnu packages backup)
#:use-module (gnu packages bash)
@@ -17483,6 +17484,58 @@ Week instances stringify to this form.")
(define-public python2-isoweek
(package-with-python2 python-isoweek))
+(define-public python-pyzbar
+ (package
+ (name "python-pyzbar")
+ (version "0.1.8")
+ (source
+ (origin
+ ;; There's no source tarball on PyPI.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/NaturalHistoryMuseum/pyzbar")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'remove-failing-test
+ (lambda _
+ ;; This tests if find_library was called once, but we remove
+ ;; the call in the stage below to make the library find libzbar.
+ (delete-file "pyzbar/tests/test_zbar_library.py")
+ #t))
+ (add-before 'build 'set-library-file-name
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((libzbar (assoc-ref inputs "zbar")))
+ (substitute* "pyzbar/zbar_library.py"
+ (("find_library\\('zbar'\\)")
+ (string-append "'" libzbar "/lib/libzbar.so.0'")))
+ #t))))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("python-numpy" ,python-numpy)
+ ("python-pillow" ,python-pillow)))
+ (inputs
+ `(("zbar" ,zbar)))
+ (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
+ (synopsis "Read one-dimensional barcodes and QR codes")
+ (description
+ "Read one-dimensional barcodes and QR codes using the zbar library.
+
+Features:
+
+@itemize
+@item Pure python
+@item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
+@item Decodes locations of barcodes
+@item No dependencies, other than the zbar library itself
+@end itemize")
+ (license license:expat)))
+
(define-public python-tokenize-rt
(package
(name "python-tokenize-rt")
- branch master updated (d76b668 -> 2a4f3c1), guix-commits, 2020/10/18
- 05/17: gnu: gn: Update to 0.0-1819.e327ffd., guix-commits, 2020/10/18
- 01/17: gnu: extempore: Inline custom package variants., guix-commits, 2020/10/18
- 06/17: gnu: ungoogled-chromium: Update to 86.0.4240.75-0.c34a56d., guix-commits, 2020/10/18
- 03/17: gnu: LLVM, Clang: Add 11.0.0., guix-commits, 2020/10/18
- 04/17: gnu: lld: Update to 11.0.0., guix-commits, 2020/10/18
- 12/17: gnu: Add python-pyotp., guix-commits, 2020/10/18
- 10/17: gnu: Add passwordsafe., guix-commits, 2020/10/18
- 14/17: gnu: Add python-pyzbar.,
guix-commits <=
- 15/17: gnu: Add authenticator., guix-commits, 2020/10/18
- 13/17: gnu: Add yoyo-migrations., guix-commits, 2020/10/18
- 17/17: gnu: Add libebur128., guix-commits, 2020/10/18
- 02/17: gnu: llvm.scm: Reorder variables., guix-commits, 2020/10/18
- 07/17: gnu: Add python-grandalf., guix-commits, 2020/10/18
- 08/17: gnu: Add python-pykeepass., guix-commits, 2020/10/18
- 16/17: gnu: Add ccal., guix-commits, 2020/10/18
- 11/17: gnu: Add python-pyfavicon., guix-commits, 2020/10/18
- 09/17: gnu: libpwquality: Enable Python binding., guix-commits, 2020/10/18