gnu: python-click: Update to 7.1.2.

* gnu/packages/python-xyz.scm (python-click): Update to 7.1.2.
[arguments] Fix the name of the file to modify. Set PYTHONPATH to make tests pass.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
This commit is contained in:
Tanguy Le Carrour 2020-07-16 14:43:29 +02:00 committed by Efraim Flashner
parent 381ea2b443
commit 099516cb3b
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -2429,14 +2429,14 @@ (define-public python-cli-helpers
(define-public python-click (define-public python-click
(package (package
(name "python-click") (name "python-click")
(version "7.0") (version "7.1.2")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (pypi-uri "click" version)) (uri (pypi-uri "click" version))
(sha256 (sha256
(base32 (base32
"1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v")))) "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
`(#:phases `(#:phases
@ -2445,12 +2445,13 @@ (define-public python-click
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let ((glibc (assoc-ref inputs ,(if (%current-target-system) (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
"cross-libc" "libc")))) "cross-libc" "libc"))))
(substitute* "click/_unicodefun.py" (substitute* "src/click/_unicodefun.py"
(("'locale'") (("'locale'")
(string-append "'" glibc "/bin/locale'")))) (string-append "'" glibc "/bin/locale'"))))
#t)) #t))
(replace 'check (replace 'check
(lambda _ (lambda _
(setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
(invoke "python" "-m" "pytest")))))) (invoke "python" "-m" "pytest"))))))
(native-inputs (native-inputs
`(("python-pytest" ,python-pytest))) `(("python-pytest" ,python-pytest)))