diff --git a/gnu/packages/aidc.scm b/gnu/packages/aidc.scm index 1a92b9d20ad..f9e524cebfb 100644 --- a/gnu/packages/aidc.scm +++ b/gnu/packages/aidc.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2017 Hartmut Goebel ;;; Copyright © 2018, 2019, 2022 Tobias Geerinckx-Rice ;;; Copyright © 2019 Guillaume Le Vaillant +;;; Copyright © 2020 Vinicius Monego ;;; Copyright © 2020 Leo Famulari ;;; Copyright © 2023 Ricardo Wurmus ;;; Copyright © 2024 Nicolas Graves @@ -55,6 +56,55 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system glib-or-gtk)) +(define-public python-pyzbar + (package + (name "python-pyzbar") + (version "0.1.9") + (source + (origin + (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 "1df1dvr8i2wyr2vw5pq8rlz2wm4xqda0wbgja19bvql1m9im11ph")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-backend #~'unittest + #: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"))) + (add-before 'build 'set-library-file-name + (lambda _ + (let ((libzbar #$(this-package-input "zbar"))) + (substitute* "pyzbar/zbar_library.py" + (("find_library\\('zbar'\\)") + (string-append "'" libzbar "/lib/libzbar.so.0'"))))))))) + (native-inputs + (list pkg-config python-numpy python-pillow python-setuptools)) + (inputs + (list 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-zbarlight (package (name "python-zbarlight") diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index e3f039b9a00..e4bc4f89bb9 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -81,6 +81,7 @@ #:use-module (guix svn-download) #:use-module (guix utils) #:use-module (gnu packages) + #:use-module (gnu packages aidc) #:use-module (gnu packages algebra) #:use-module (gnu packages autotools) #:use-module (gnu packages backup) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index cddbf05b72a..375610e27c0 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -28899,55 +28899,6 @@ a notation for identifying weeks; yyyyWww (where the W is a literal). Week instances stringify to this form.") (license license:bsd-3))) -(define-public python-pyzbar - (package - (name "python-pyzbar") - (version "0.1.9") - (source - (origin - (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 "1df1dvr8i2wyr2vw5pq8rlz2wm4xqda0wbgja19bvql1m9im11ph")))) - (build-system pyproject-build-system) - (arguments - (list - #:test-backend #~'unittest - #: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"))) - (add-before 'build 'set-library-file-name - (lambda _ - (let ((libzbar #$(this-package-input "zbar"))) - (substitute* "pyzbar/zbar_library.py" - (("find_library\\('zbar'\\)") - (string-append "'" libzbar "/lib/libzbar.so.0'"))))))))) - (native-inputs - (list pkg-config python-numpy python-pillow python-setuptools)) - (inputs - (list 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")