summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-05-15 22:41:27 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-05-31 14:53:59 -0400
commite3b18cfbb7751397ab273bb503b7e19c20c5d2e7 (patch)
treeb6ed421cb67b8a4d3bc4caa554bf90e1f8c5ee57
parent9022934059f0159007b3eda737d97971eaa39bc1 (diff)
downloadguix-patches-e3b18cfbb7751397ab273bb503b7e19c20c5d2e7.tar
guix-patches-e3b18cfbb7751397ab273bb503b7e19c20c5d2e7.tar.gz
gnu: python-gamera: Update to 4.0.0.
* gnu/packages/python-xyz.scm (python2-gamera): Rename to... (python-gamera): ... this. Update to 4.0.0. [python]: Delete argument. [phases]{check}: New override. [native-inputs]: Add python-pytest.
-rw-r--r--gnu/packages/python-xyz.scm34
1 files changed, 25 insertions, 9 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3e8d10d8bc..74b927eab2 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26357,17 +26357,17 @@ error-prone \"update the embedded version string\" step from your release
process.")
(license license:public-domain)))
-(define-public python2-gamera
+(define-public python-gamera
(package
- (name "python2-gamera")
- (version "3.4.4")
+ (name "python-gamera")
+ (version "4.0.0")
(source
(origin
(method url-fetch)
(uri (string-append "https://gamera.informatik.hsnr.de/download/"
"gamera-" version ".tar.gz"))
(sha256
- (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
+ (base32 "0fhlwbvpm3k54n4aa1y6qd348jqrb54ak9p0ic16drx7f07dsq05"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -26377,17 +26377,33 @@ process.")
"src/libtiff"
"src/zlib-1.2.8"))))))
(build-system python-build-system)
- (inputs
- (list libpng libtiff zlib))
(arguments
- `(#:python ,python-2
- #:phases
+ `(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'disable-wx-support
(lambda _
(substitute* "setup.py"
(("no_wx = False")
- "no_wx = True")))))))
+ "no_wx = True"))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; Some tests require a writable HOME directory and test
+ ;; directory.
+ (setenv "HOME" "/tmp")
+ (mkdir "tests/tmp") ;the code assumes this directory exists
+ ;; (for-each make-file-writable (find-files "tests"))
+ (with-directory-excursion "tests"
+ (invoke "pytest" "-vv"
+ ;; This test causes gamera/gendoc.py to be loaded,
+ ;; which fails due to the missing docutils, pygments
+ ;; and silvercity (very old, unpackaged) libraries.
+ "--ignore" "test_plugins.py"
+ ;; This test triggers a segfault (see:
+ ;; https://github.com/hsnr-gamera/gamera-4/issues/47).
+ "--ignore" "test_rle.py"))))))))
+ (native-inputs (list python-pytest))
+ (inputs (list libpng libtiff zlib))
(synopsis "Framework for building document analysis applications")
(description
"Gamera is a toolkit for building document image recognition systems.")