summaryrefslogtreecommitdiff
path: root/gnu/packages/djvu.scm
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2025-11-24 16:06:31 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-12-01 23:23:52 +0000
commitdc155f82a02fbcc9917fdfa6424e92e3d7525bce (patch)
tree153e01007896bc18a31c6668a80232bfeeafe2db /gnu/packages/djvu.scm
parent18e814ae5c911204284b570eba53349b21fa7ac8 (diff)
gnu: didjvu: Switch to pyproject.
* gnu/packages/djvu.scm (didjvu): [build-system]: Switch to pyproject-build-system. [arguments]: Improve style. <#:phases>: Relocate and refresh phase 'wrap-path. [native-inputs]: Add python-setuptools. Remove python-nose, as tests are disabled anyway. Change-Id: I66844660a5cb54cb72f75e021db40908756df35d Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/djvu.scm')
-rw-r--r--gnu/packages/djvu.scm78
1 files changed, 40 insertions, 38 deletions
diff --git a/gnu/packages/djvu.scm b/gnu/packages/djvu.scm
index 52e410bb627..5845daf32a6 100644
--- a/gnu/packages/djvu.scm
+++ b/gnu/packages/djvu.scm
@@ -28,6 +28,7 @@
#:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
@@ -47,6 +48,7 @@
#:use-module (gnu packages pdf)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-build)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
@@ -297,45 +299,45 @@ and white.")
(package
(name "didjvu")
(version (git-version "0.10.2" revision commit))
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/FriedrichFroebel/didjvu")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0ippf3hsjy13xj6pqnqr30dz8lsncsfcan2r1vbxfk1g602m3p4c"))))
- (build-system python-build-system)
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/FriedrichFroebel/didjvu")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0ippf3hsjy13xj6pqnqr30dz8lsncsfcan2r1vbxfk1g602m3p4c"))))
+ (build-system pyproject-build-system)
(arguments
- `(;; FIXME: Tests fail because they try to load the libxmp and pyexiv2
- ;; modules that should not be enabled, as we only enable the gexiv2
- ;; module.
- #:tests? #f
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (add-before 'check 'disable-failing-test
- (lambda _
- (substitute* "tests/test_ipc.py"
- ;; test_wait_signal gets stuck forever
- (("self\\._test_signal\\(name\\)")
- "return True")
- ;; test_path fails to find a file it should have created
- (("path = os\\.getenv\\('PATH'\\)")
- "return True"))
- (substitute* "tests/test_timestamp.py"
- ;; test_timezones fails with:
- ;; '2009-12-18T21:25:14Z' != '2009-12-18T22:25:14+01:00'
- (("samples = \\[" all)
- (string-append "return True\n " all)))))
- (add-after 'install 'wrap-path
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (djvulibre (assoc-ref inputs "djvulibre")))
- (wrap-program (string-append out "/bin/didjvu")
- `("PATH" ":" prefix (,(string-append djvulibre "/bin"))))))))))
- (native-inputs (list python-nose))
+ (list
+ ;; FIXME: Tests fail because they try to load the libxmp and pyexiv2
+ ;; modules that should not be enabled, as we only enable the gexiv2
+ ;; module.
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'check 'disable-failing-test
+ (lambda _
+ (substitute* "tests/test_ipc.py"
+ ;; test_wait_signal gets stuck forever
+ (("self\\._test_signal\\(name\\)")
+ "return True")
+ ;; test_path fails to find a file it should have created
+ (("path = os\\.getenv\\('PATH'\\)")
+ "return True"))
+ (substitute* "tests/test_timestamp.py"
+ ;; test_timezones fails with:
+ ;; '2009-12-18T21:25:14Z' != '2009-12-18T22:25:14+01:00'
+ (("samples = \\[" all)
+ (string-append "return True\n " all)))))
+ (add-after 'wrap 'wrap-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (wrap-program (string-append #$output "/bin/didjvu")
+ `("PATH" ":" prefix
+ (,(dirname (search-input-file inputs "bin/ddjvu"))))))))))
+ (native-inputs (list python-setuptools))
(inputs
(list bash-minimal
djvulibre