mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-28 12:01:49 +02:00
gnu: didjvu: Switch to a Python 3 compatible fork.
* gnu/packages/djvu.scm (didjvu)[source]: Switch to a Python 3 compatible fork. [native-inputs, inputs]: Move below arguments field. Use new style. Replace the Python 2 inputs by their Python 3 equivalents.
This commit is contained in:
+67
-64
@@ -3,6 +3,7 @@
|
|||||||
;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
||||||
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
|
;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
|
||||||
|
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
@@ -292,71 +293,73 @@ and white.")
|
|||||||
(license license:gpl2)))
|
(license license:gpl2)))
|
||||||
|
|
||||||
(define-public didjvu
|
(define-public didjvu
|
||||||
(package
|
(let ((revision "0")
|
||||||
(name "didjvu")
|
(commit "c792d61e85fbe5b6e678bc7d686b0208717c587b"))
|
||||||
(version "0.9")
|
(package
|
||||||
(source
|
(name "didjvu")
|
||||||
(origin
|
(version (git-version "0.9" revision commit))
|
||||||
(method url-fetch)
|
(source (origin
|
||||||
(uri (string-append
|
(method git-fetch)
|
||||||
"https://github.com/jwilk/didjvu/releases/download/" version
|
(uri (git-reference
|
||||||
"/didjvu-" version ".tar.gz"))
|
(url "https://github.com/FriedrichFroebel/didjvu")
|
||||||
(sha256
|
(commit commit)))
|
||||||
(base32 "0xyrnk8d2khi7q1zr28gjkjq6frz4mkb5jdl8821yzf12k7c8pbv"))))
|
(file-name (git-file-name name version))
|
||||||
(build-system gnu-build-system)
|
(sha256
|
||||||
(native-inputs
|
(base32
|
||||||
(list python2-nose))
|
"09lwfwirmfl93062i2rvdcrgwp9fj95ny07059bxq7dl6z0z35qj"))))
|
||||||
(inputs
|
(build-system gnu-build-system)
|
||||||
`(("djvulibre" ,djvulibre)
|
(arguments
|
||||||
("minidjvu" ,minidjvu)
|
`(#:modules ((guix build gnu-build-system)
|
||||||
("python" ,python-2)
|
((guix build python-build-system) #:prefix python:)
|
||||||
("python2-gamera" ,python2-gamera)
|
(guix build utils))
|
||||||
("python2-pillow" ,python2-pillow)))
|
#:imported-modules (,@%gnu-build-system-modules
|
||||||
(arguments
|
(guix build python-build-system))
|
||||||
`(#:modules ((guix build gnu-build-system)
|
#:test-target "test"
|
||||||
((guix build python-build-system) #:prefix python:)
|
#:phases
|
||||||
(guix build utils))
|
(modify-phases %standard-phases
|
||||||
#:imported-modules (,@%gnu-build-system-modules
|
(delete 'configure)
|
||||||
(guix build python-build-system))
|
(add-before 'check 'disable-failing-test
|
||||||
#:test-target "test"
|
(lambda _
|
||||||
#:phases
|
(substitute* "tests/test_ipc.py"
|
||||||
(modify-phases %standard-phases
|
;; test_wait_signal gets stuck forever
|
||||||
(delete 'configure)
|
(("yield self\\._test_signal, name")
|
||||||
(add-before 'check 'disable-failing-test
|
"return True")
|
||||||
(lambda _
|
;; test_path fails to find a file it should have created
|
||||||
(substitute* "tests/test_ipc.py"
|
(("path = os\\.getenv\\('PATH'\\)\\.split\\(':'\\)")
|
||||||
;; test_wait_signal gets stuck forever
|
"return True"))
|
||||||
(("yield self\\._test_signal, name")
|
(substitute* "tests/test_timestamp.py"
|
||||||
"return True")
|
;; test_timezones fails with:
|
||||||
;; test_path fails to find a file it should have created
|
;; '2009-12-18T21:25:14Z' != '2009-12-18T22:25:14+01:00'
|
||||||
(("path = os\\.getenv\\('PATH'\\)\\.split\\(':'\\)")
|
(("@fork_isolation")
|
||||||
"return True"))
|
"return True"))))
|
||||||
(substitute* "tests/test_timestamp.py"
|
(replace 'install
|
||||||
;; test_timezones fails with:
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
;; '2009-12-18T21:25:14Z' != '2009-12-18T22:25:14+01:00'
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(("@fork_isolation")
|
(invoke "make"
|
||||||
"return True"))))
|
"DESTDIR="
|
||||||
(replace 'install
|
(string-append "PREFIX=" out)
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
"install"))))
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(add-after 'install 'wrap-python
|
||||||
(invoke "make"
|
(assoc-ref python:%standard-phases 'wrap))
|
||||||
"DESTDIR="
|
(add-after 'wrap-python 'wrap-path
|
||||||
(string-append "PREFIX=" out)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
"install"))))
|
(let ((out (assoc-ref outputs "out"))
|
||||||
(add-after 'install 'wrap-python
|
(djvulibre (assoc-ref inputs "djvulibre")))
|
||||||
(assoc-ref python:%standard-phases 'wrap))
|
(wrap-program (string-append out "/bin/didjvu")
|
||||||
(add-after 'wrap-python 'wrap-path
|
`("PATH" ":" prefix (,(string-append djvulibre "/bin"))))))))))
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(native-inputs (list python-nose))
|
||||||
(let ((out (assoc-ref outputs "out"))
|
(inputs
|
||||||
(djvulibre (assoc-ref inputs "djvulibre")))
|
(list djvulibre
|
||||||
(wrap-program (string-append out "/bin/didjvu")
|
minidjvu
|
||||||
`("PATH" ":" prefix (,(string-append djvulibre "/bin"))))))))))
|
python-gamera
|
||||||
(synopsis "DjVu encoder with foreground/background separation")
|
python-pillow
|
||||||
(description
|
python-wrapper))
|
||||||
"@code{didjvu} uses the @code{Gamera} framework to separate the foreground
|
(synopsis "DjVu encoder with foreground/background separation")
|
||||||
|
(description
|
||||||
|
"@code{didjvu} uses the @code{Gamera} framework to separate the foreground
|
||||||
and background layers of images, which can then be encoded into a DjVu file.")
|
and background layers of images, which can then be encoded into a DjVu file.")
|
||||||
(home-page "https://jwilk.net/software/didjvu")
|
(home-page "https://jwilk.net/software/didjvu")
|
||||||
(license license:gpl2)))
|
(license license:gpl2))))
|
||||||
|
|
||||||
(define-public ocrodjvu
|
(define-public ocrodjvu
|
||||||
(let ((revision "0")
|
(let ((revision "0")
|
||||||
|
|||||||
Reference in New Issue
Block a user