guix_mirror_bot pushed a commit to branch python-team
in repository guix.
commit 82e45099baec5ad9bc0435ecc5470aa16ba5098b
Author: Nicolas Graves <[email protected]>
AuthorDate: Sun Nov 2 04:47:00 2025 +0100
gnu: python-pyzbar: Modernize package.
* gnu/packages/aidc.scm (python-pyzbar)
[native-inputs]: Add python-pytest.
[arguments]<#:test-flags>: Adapt accordingly.
<#:phases>: Drop phase 'remove-failing-test. Refresh phase
'set-library-file-name.
Change-Id: I247cfd60a4c36d42918befe1ce4231cd8eb24180
Signed-off-by: Sharlatan Hellseher <[email protected]>
---
gnu/packages/aidc.scm | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/gnu/packages/aidc.scm b/gnu/packages/aidc.scm
index 3d1642827b..ccc63a1620 100644
--- a/gnu/packages/aidc.scm
+++ b/gnu/packages/aidc.scm
@@ -73,22 +73,24 @@
(build-system pyproject-build-system)
(arguments
(list
- #:test-backend #~'unittest
+ #:test-flags
+ ;; This tests if find_library was called once, but we remove
+ ;; the call in the stage below to make the library find libzbar.
+ #~(list "-k" "not test_*_found_non_windows")
#: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'")))))))))
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "pyzbar/zbar_library.py"
+ (("find_library\\('zbar'\\)")
+ (format #f "~s"
+ (search-input-file inputs "/lib/libzbar.so.0")))))))))
(native-inputs
- (list pkg-config python-numpy python-pillow python-setuptools))
+ (list pkg-config
+ python-numpy
+ python-pillow
+ python-pytest
+ python-setuptools))
(inputs
(list zbar))
(home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")