From: Chris Marusich <cmmarusich@gmail.com>
To: 35333@debbugs.gnu.org
Cc: Chris Marusich <cmmarusich@gmail.com>
Subject: [bug#35333] [PATCH 2/6] gnu: Add python-pyscard and python2-pyscard.
Date: Fri, 19 Apr 2019 18:07:56 -0700 [thread overview]
Message-ID: <20190420010800.5741-3-cmmarusich@gmail.com> (raw)
In-Reply-To: <20190420010800.5741-1-cmmarusich@gmail.com>
* gnu/packages/security-token.scm (python-pyscard, python2-pyscard): New
variables.
---
gnu/packages/security-token.scm | 59 ++++++++++++++++++++++++++++++++-
1 file changed, 58 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index c88a1c6b2a..52bd80780c 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -6,7 +6,7 @@
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
+;;; Copyright © 2018, 2019 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of GNU Guix.
@@ -32,6 +32,7 @@
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system glib-or-gtk)
+ #:use-module (guix build-system python)
#:use-module (gnu packages autotools)
#:use-module (gnu packages curl)
#:use-module (gnu packages check)
@@ -51,6 +52,8 @@
#:use-module (gnu packages tex)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages swig)
#:use-module (gnu packages web)
#:use-module (gnu packages xml))
@@ -341,3 +344,57 @@ and other operations. It includes a library and a command-line tool.")
line tools for personalizing YubiKeys. You can use these to set an AES key,
retrieve a YubiKey's serial number, and so forth.")
(license license:bsd-2)))
+
+(define-public python-pyscard
+ (package
+ (name "python-pyscard")
+ (version "1.9.8")
+ (source (origin
+ (method url-fetch)
+ ;; The maintainer publishes releases on various sites, but
+ ;; SourceForge is apparently the only one with a signed release.
+ (uri (string-append
+ "mirror://sourceforge/pyscard/pyscard/pyscard%20"
+ version "/pyscard-" version ".tar.gz"))
+ (sha256
+ (base32
+ "15fh00z1an6r5j7hrz3jlq0rb3jygwf3x4jcwsa008bv8vpcg7gm"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; 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")))
+ (substitute* "setup.py"
+ (("platform_include_dirs = \\[.*?\\]")
+ (string-append
+ "platform_include_dirs = ['" pcsc-include-dir "']")))
+ #t)))
+ ;; 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\";"
+ (string-append (assoc-ref inputs "pcsc-lite")
+ "/lib/libpcsclite.so.1"))))
+ #t)))))
+ (inputs
+ `(("pcsc-lite" ,pcsc-lite)))
+ (native-inputs
+ `(("swig" ,swig)))
+ (home-page "https://github.com/LudovicRousseau/pyscard")
+ (synopsis "Smart card library for Python")
+ (description
+ "The pyscard smart card library is a framework for building smart card
+aware applications in Python. The smart card module is built on top of the
+PCSC API Python wrapper module.")
+ (license license:lgpl2.1+)))
+
+(define-public python2-pyscard
+ (package-with-python2 python-pyscard))
--
2.20.1
next prev parent reply other threads:[~2019-04-20 1:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-20 0:38 [bug#35333] [PATCH 0/6] Add Yubikey Manager and Its Dependencies Chris Marusich
2019-04-20 1:07 ` Chris Marusich
2019-04-20 1:07 ` [bug#35333] [PATCH 1/6] gnu: Add python-pyfakefs and python2-pyfakefs Chris Marusich
2019-04-20 1:41 ` Chris Marusich
2019-04-20 2:25 ` Chris Marusich
2019-04-20 1:07 ` Chris Marusich [this message]
2019-04-20 1:07 ` [bug#35333] [PATCH 3/6] gnu: Add libu2f-host Chris Marusich
2019-04-20 1:07 ` [bug#35333] [PATCH 4/6] gnu: Add public-suffix-list Chris Marusich
2019-04-20 1:07 ` [bug#35333] [PATCH 5/6] gnu: Add python-fido2 and python2-fido2 Chris Marusich
2019-04-20 1:08 ` [bug#35333] [PATCH 6/6] gnu: Add python-yubikey-manager and python2-yubikey-manager Chris Marusich
2019-04-20 7:32 ` [bug#35333] [PATCH 0/6] Add Yubikey Manager and Its Dependencies Ricardo Wurmus
2019-04-25 4:14 ` bug#35333: " Chris Marusich
2019-04-24 19:24 ` [bug#35333] " Danny Milosavljevic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190420010800.5741-3-cmmarusich@gmail.com \
--to=cmmarusich@gmail.com \
--cc=35333@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).