me
/
guix
Archived
1
0
Fork 0

gnu: python-wand: Fix libmagick access.

* gnu/packages/python-xyz.scm (python-wand):
[build-system]: Use pyproject-build-system.
[arguments](phases): Delete phase check. Replace phase find-magickwand
by phase harcode-lib-path.

Change-Id: I3ddf7045a404f76743c14a5b8183ce9f3196ffd1
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
master
Nicolas Graves 2023-12-23 16:33:25 +01:00 committed by Mathieu Othacehe
parent cd7763350a
commit ea785c2bb8
No known key found for this signature in database
GPG Key ID: 8354763531769CA6
1 changed files with 11 additions and 11 deletions

View File

@ -2594,18 +2594,18 @@ conventions and aliases in the same expression.")
(uri (pypi-uri "Wand" version))
(sha256
(base32 "1jpwm956vm35hmgjndr2jwrcql0bwvpsl88q5nr0x8ppxa2380gm"))))
(build-system python-build-system)
(build-system pyproject-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'find-magickwand
(lambda* (#:key inputs #:allow-other-keys)
(setenv "MAGICK_HOME" (assoc-ref inputs "imagemagick"))
(setenv "WAND_MAGICK_LIBRARY_SUFFIX" ".Q16")))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "pytest" "-vv")))))))
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'hardcode-lib-path
(lambda _
(substitute* "wand/api.py"
(("os\\.environ\\.get\\('MAGICK_HOME'\\)")
(string-append "\"" #$(this-package-input "imagemagick") "\""))
(("os\\.environ\\.get\\('WAND_MAGICK_LIBRARY_SUFFIX'\\)")
"\".Q16\"")))))))
(native-inputs
(list python-pytest))
(inputs