/usr/share/pyshared/smartcard/README is in python-pyscard 1.6.12.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 | -------------------------------------------------------------------------------
pyscard smartcard library for python
-------------------------------------------------------------------------------
http://pyscard.sourceforge.net/
-------------------------------------------------------------------------------
Copyright 2001-2012 gemalto
Author: Jean-Daniel Aussel, mailto:jean-daniel.aussel@gemalto.com
This file is part of pyscard.
pyscard is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
pyscard is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public License
along with pyscard; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-------------------------------------------------------------------------------
Last update : pyscard 1.6.14 (April 2012)
-------------------------------------------------------------------------------
pyscard is a python module adding smart cards support to python.
It consists of the smartcard.scard module, an extension module wrapping
Windows smart card base components (also known as PCSC) on Windows, and
PCSC lite on linux and Mac OS X Tiger, and of the smartcard module, a
python framework with objects wrapping PCSC API.
-------------------------------------------------------------------------------
Documentation
-------------------------------------------------------------------------------
All documentation is provided in the smartcard/doc directory of the
source distribution. Examples are provided in the smartcard/Examples
directory of the source distribution. The binary distribution does not
include any documentation, tests scripts or examples.
-------------------------------------------------------------------------------
Installation
-------------------------------------------------------------------------------
The pyscard library is packaged using the standard distutils python
module.
Installation on windows
-----------------------
Installing on windows from the binary distribution
--------------------------------------------------
1. download the binary msi installer or self-executable installer
2. execute the installer
The binary msi installer and self-executable installer are packaged for
a specific version of python, and have name similar to
pyscard-1.6.14.win32-py2.5.msi and pyscard-1.6.14.win32-py2.5.exe for
python 2.5.
Installing on windows from the source distribution
---------------------------------------------------
1. you will need swig 1.3.31 from http://www.swig.org, and a C compiler.
By default, Visual Studio 2003 is required for building the c language
wrapper for python 2.5, and Visual Studio .Net or VisualC++ 6 for python
2.4. You might use another release by fiddling with the
python/Lib/distutils/msvccompiler.py file that detects the compiler.
2. download the source distribution
The source distribution is available as pyscard-1.6.14.zip for windows,
and pyscard-1.6.14.tar.gz for linux.
3. unzip the source distribution, open a console and type the following:
setup.py build_ext install
This will build pyscard and install it in the site-packages directory of
your python distribution, e.g. c:\python25\Lib\site-packages\smartcard.
This install procedure does not install the documentation, examples or test
files.
Installation on linux:
----------------------
Installing on linux from the binary distribution:
-------------------------------------------------
1. download the binary distribution
The binary distribution is either an archive file or a rpm file, with
names similar to pyscard-1.6.14-1.i386.rpm for the rpm distribution, or
pyscard-1.6.14.linux-i686.tar.gz for the archive distribution.
2. untar the binary distribution
With root privilege from a terminal, extract the archive from /, or
install the rpm.
Installing on linux from the source distribution
------------------------------------------------
1. you will need gcc, swig 1.3.31 (http://www.swig.org), and pcsc-lite
(http://pcsclite.alioth.debian.org/)
2. download the source distribution
The source distribution is available as pyscard-1.6.14.zip or
pyscard-1.6.14.tar.gz.
3. untar the source distribution
4. from a terminal with root privileges, type the following:
/usr/bin/python setup.py build_ext install
This will build pyscard and install it in the site-packages directory of
your python distribution, e.g.
/usr/lib/python2.4/site-packages/smartcard.
Installation on Max OS X Tiger:
--------------------------------
The Mac OS X Tiger support is experimental on pyscard 1.6.14. It was
developed and tested on a i386 MacBook Pro. Please drop me a mail if you
succeed on a ppc MacBook.
Installing on Mac OS X Tiger from the binary distribution:
----------------------------------------------------
1. download the binary distribution
The binary distribution is an archive file, with a name similar to
pyscard-1.6.14-py-2.3-macosx10.4.mpkg or
pyscard-1.6.14-py-2.5-macosx10.4.mpkg.
2. Open the package and proceed with installation.
Python 2.3 is pre-installed, so install
pyscard-1.6.14-py-2.3-macosx10.4.mpkg if you did not install another
release of python.
Install pyscard-1.6.14-py-2.5-macosx10.4.mpkg if you installed python 2.5.
Installing on Mac OS X Tiger from the source distribution
----------------------------------------------------------
1. you will need swig 1.3.31 (http://www.swig.org); gcc and pcsc-lite
are available out of the box on Max OS X Tiger
2. download the source distribution
The source distribution is available as pyscard-1.6.14.zip or
pyscard-1.6.14.tar.gz.
3. untar or unzip the source distribution
4. from a terminal, type the following:
sudo python setup.py build_ext install
This will build pyscard and install it in the site-packages directory of
your python distribution, e.g.
/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib/site-packages/smartcard
Installation on Max OS X Leopard:
---------------------------------
Installing on Mac OS X Leopard from the binary distribution:
----------------------------------------------------
1. download the binary distribution
The binary distribution is an archive file, with a name similar to
pyscard-1.6.14-py-2.5-macosx10.5.mpkg.
2. Open the package and proceed with installation.
Installing on Mac OS X Leopard from the source distribution
------------------------------------------------------------
1. you will need swig 1.3.31 (http://www.swig.org); gcc and pcsc-lite
are available out of the box on Max OS X Leopard
2. download the source distribution
The source distribution is available as pyscard-1.6.14.zip or
pyscard-1.6.14.tar.gz.
3. untar or unzip the source distribution
4. from a terminal, type the following:
sudo python setup.py build_ext install
This will build pyscard and install it in the site-packages directory of
your python distribution, e.g.
/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.3/lib/site-packages/smartcard
Installation on Max OS X Lion:
------------------------------
Installing on Mac OS X Lion from the binary distribution:
---------------------------=====-------------------------
1. download the binary distribution
The binary distribution is an archive file, with a name similar to
pyscard-1.6.14-py-2.7-macosx10.7.mpkg.
2. Open the package and proceed with installation.
Installing on Mac OS X Lion from the source distribution
--------------------------------------------------------
1. you will need swig 2.0.4 (http://www.swig.org) and Xcode
(http://developer.apple.com/xcode/);
pcsc-lite is available out of the box on Max OS X Leopard
2. download the source distribution
The source distribution is available as pyscard-1.6.14.zip or
pyscard-1.6.14.tar.gz.
3. untar or unzip the source distribution
4. from a terminal, type the following:
sudo python setup.py build_ext install
This will build pyscard and install it in the site-packages directory of
your python distribution, e.g. /Library/Python/2.7/lib/site-packages/smartcard
-------------------------------------------------------------------------------
Developer documentation, unit tests and examples
-------------------------------------------------------------------------------
The developer documentation is in the smartcard/doc directory of the
source distribution.
Examples are located in the smartcard/Examples directory, and the pyunit
unit tests in the smartcard/test directory.
-------------------------------------------------------------------------------
Build instructions for packagers
-------------------------------------------------------------------------------
Building a binary distribution for Windows
------------------------------------------
To build a binary distribution from the source distribution, you will
need a C compiler and swig 1.3.31 (same requirements as for installing
from the source distribution).
In the root directory of the source distribution, execute the following
command in a console:
setup.py build_ext bdist_msi
setup.py build_ext bdist_wininst
This will build the msi installer and self-executable installer in the
dist directory, with names similar to pyscard-1.6.14.win32-py2.5.msi and
pyscard-1.6.14.win32-py2.5.exe for python 2.5, and
pyscard-1.6.14.win32-py2.4.msi and pyscard-1.6.14.win32-py2.4.exe for
python 2.4.
Building a binary distribution for linux
----------------------------------------
To build a binary distribution from the source distribution, you will
need gcc, swig 1.3.31 and pcsc-lite (same requirements as for installing
from the source distribution).
In the root directory of the source distribution, execute the following
command in a terminal:
/usr/bin/python setup.py build_ext bdist
This will build a package similar to pyscard-1.6.14.linux-i686.tar.gz
containing a tree
Building a rpm distribution for linux
----------------------------------------
To build a rpm distribution from the source distribution, you will need
gcc, swig 1.3.31 and pcsc-lite (same requirements as for installing from
the source distribution).
In the root directory of the source distribution, execute the following
command in a terminal:
/usr/bin/python setup.py build bdist_rpm
If you have rpm 4.1 or above, you will need to add the
%_unpackaged_files_terminate_build 0 options to the /etc/rpm/macros file,
e.g.:
echo "%_unpackaged_files_terminate_build 0" >> /etc/rpm/macros
This will build in the dist directory a binary distribution with a name
similar to pyscard-1.6.14-1.i386.rpm.
Building a binary distribution for Mac OS X Tiger
-------------------------------------------------
To build a binary distribution from the source distribution, you will
need swig 1.3.31 (same requirements as for installing from the source
distribution) and bdist_mpkg 0.4.3
(http://cheeseshop.python.org/pypi/bdist_mpkg/).
If you are using the pre-installed python 2.3 distribution, in the root
directory of the source distribution, i.e. in the src directory, execute
the following commands in a terminal:
python setup.py build_ext
/System/Library/Frameworks/Python.Framework/Versions/2.3/bin/bdist_mpkg setup.py
This will build package pyscard-1.6.14-py-2.3-macosx10.4.mpkg.
If you are using python 2.5, in the root directory of the source distribution,
i.e. in the src directory, execute the following commands in a terminal:
python setup.py build_ext
/Library/Frameworks/Python.Framework/Versions/2.5/bin/bdist_mpkg setup.py
This will build package pyscard-1.6.14-py-2.6-macosx10.4.mpkg.
Building a binary distribution for Mac OS X Lion
-------------------------------------------------
To build a binary distribution from the source distribution, you will
need swig 2.0.4 and Xcode (same requirements as for installing from the source
distribution) and bdist_mpkg 0.4.4 (http://pypi.python.org/pypi/bdist_mpkg/).
Install bdist_mpkg by executing the bdist_mpkg setup.py script with
build and install as arguments, i.e. from the root directory of the
bdist_mpkg source distribution enter: python setup.py build install.
From the root directory of the pyscard source distribution,
i.e. in the src directory, execute the following commands in a terminal:
python setup.py build_ext
bdist_mpkg setup.py
This will build package pyscard-1.6.14-py-2.7-macosx10.7.mpkg in the dist
directory.
Building a binary distribution for Mac OS X Leopard
---------------------------------------------------
To build a binary distribution from the source distribution, you will
need swig 1.3.31 (same requirements as for installing from the source
distribution) and bdist_mpkg 0.4.3
(http://cheeseshop.python.org/pypi/bdist_mpkg/).
Apply the following patch to tools.py of bdist_mpkg package:
===== patch start ===
diff -rNu bdist_mpkg-0.4.3/bdist_mpkg/tools.py bdist_mpkg-0.4.3.leopard/bdist_mpkg/tools.py
--- bdist_mpkg-0.4.3/bdist_mpkg/tools.py 2006-07-09 00:39:00.000000000 -0400
+++ bdist_mpkg-0.4.3.leopard/bdist_mpkg/tools.py 2008-08-21 07:43:35.000000000 -0400
@@ -79,15 +79,12 @@
yield os.path.join(root, fn)
def get_gid(name, _cache={}):
- if not _cache:
- for line in os.popen('/usr/bin/nidump group .'):
- fields = line.split(':')
- if len(fields) >= 3:
- _cache[fields[0]] = int(fields[2])
- try:
- return _cache[name]
- except KeyError:
- raise ValueError('group %s not found' % (name,))
+ for line in os.popen("dscl . -read /Groups/" + name + " PrimaryGroupID"):
+ fields = [f.strip() for f in line.split(':')]
+ if fields[0] == "PrimaryGroupID":
+ return fields[1]
+
+ raise ValueError('group %s not found' % (name,))
===== patch end ========
This patch is required since Mac OS X Leopard does not have the nidump
command any more.
Install bdist_mpkg by executing the bdist_mpkg setup.py script with
build and install as arguments, i.e. from the root directory of the
bdist_mpkg source distribution enter: python setup.py build install.
For python 2.5, from the root directory of the pyscard source
distribution, i.e. in the src directory, execute the following commands
in a terminal:
python setup.py build_ext
/Library/Frameworks/Python.Framework/Versions/2.5/Extras/bin/bdist_mpkg setup.py
This will build package pyscard-1.6.14-py-2.5-macosx10.5.mpkg.
For python 2.6, from the root directory of the pyscard source distribution,
i.e. in the src directory, execute the following commands in a terminal:
python setup.py build_ext
/Library/Frameworks/Python.framework/Versions/2.6/bin/bdist_mpkg setup.py
This will build package pyscard-1.6.14-py-2.6-macosx10.5.mpkg.
-------------------------------------------------------------------------------
Issue Tracking
-------------------------------------------------------------------------------
If you encounter a bug, please report it in the SourceForge bug tracker at
http://sourceforge.net/tracker/?group_id=196342&atid=957072
https://sourceforge.net/tracker/?group_id=196342&atid=957072
-jda
|