From 221806905b68f9b52b90bd5c80722d4a5ab3f353 Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Fri, 14 Jul 2023 12:13:34 -0400 Subject: gnu: python-pyscard: Update to 2.0.7. * gnu/packages/security-token.scm (python-pyscard): Update to 2.0.7. [arguments]{phases}: Use search-input-directory. Remove trailing #t. Signed-off-by: John Kehayias --- gnu/packages/security-token.scm | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm index 76e220ad7c..cb72468b3b 100644 --- a/gnu/packages/security-token.scm +++ b/gnu/packages/security-token.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2023 Jake Leporte ;;; Copyright © 2023 Timotej Lazar ;;; Copyright © 2023 Maxim Cournoyer +;;; Copyright © 2023 Pierre Langlois ;;; ;;; This file is part of GNU Guix. ;;; @@ -462,7 +463,7 @@ retrieve a YubiKey's serial number, and so forth.") (define-public python-pyscard (package (name "python-pyscard") - (version "1.9.9") + (version "2.0.7") (source (origin (method url-fetch) ;; The maintainer publishes releases on various sites, but @@ -472,7 +473,7 @@ retrieve a YubiKey's serial number, and so forth.") version "/pyscard-" version ".tar.gz")) (sha256 (base32 - "082cjkbxadaz2jb4rbhr0mkrirzlqyqhcf3r823qb0q1k50ybgg6")))) + "1gy1hmzrhfa7bqs132v89pchm9q3rpnqf3a6225vwpx7bx959017")))) (build-system python-build-system) (arguments `(#:phases @@ -480,24 +481,21 @@ retrieve a YubiKey's serial number, and so forth.") ;; Tell pyscard where to find the PCSC include directory. (add-after 'unpack 'patch-platform-include-dirs (lambda* (#:key inputs #:allow-other-keys) - (let ((pcsc-include-dir (string-append - (assoc-ref inputs "pcsc-lite") - "/include/PCSC"))) + (let ((pcsc-include-dir (search-input-directory + inputs "/include/PCSC"))) (substitute* "setup.py" (("platform_include_dirs = \\[.*?\\]") (string-append - "platform_include_dirs = ['" pcsc-include-dir "']"))) - #t))) + "platform_include_dirs = ['" pcsc-include-dir "']")))))) ;; pyscard wants to dlopen libpcsclite, so tell it where it is. (add-after 'unpack 'patch-dlopen (lambda* (#:key inputs #:allow-other-keys) (substitute* "smartcard/scard/winscarddll.c" (("lib = \"libpcsclite\\.so\\.1\";") - (simple-format #f - "lib = \"~a\";" - (search-input-file inputs - "/lib/libpcsclite.so.1")))) - #t))))) + (simple-format + #f + "lib = \"~a\";" + (search-input-file inputs "/lib/libpcsclite.so.1"))))))))) (inputs (list pcsc-lite)) (native-inputs -- cgit 1.4.1