|
| 1 | +------------------------------------------------------------------------------- |
| 2 | +pyscard smartcard library for python |
| 3 | +------------------------------------------------------------------------------- |
| 4 | +http://pyscard.sourceforge.net/ |
| 5 | +------------------------------------------------------------------------------- |
| 6 | + |
| 7 | +Copyright 2001-2007 gemalto |
| 8 | +Author: Jean-Daniel Aussel, mailto: [email protected] |
| 9 | + |
| 10 | +This file is part of pyscard. |
| 11 | + |
| 12 | +pyscard is free software; you can redistribute it and/or modify it under |
| 13 | +the terms of the GNU Lesser General Public License as published by the Free |
| 14 | +Software Foundation; either version 2.1 of the License, or (at your option) any |
| 15 | +later version. |
| 16 | + |
| 17 | +pyscard is distributed in the hope that it will be useful, but WITHOUT ANY |
| 18 | +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 19 | +PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. |
| 20 | + |
| 21 | +You should have received a copy of the GNU Lesser General Public License along |
| 22 | +with pyscard; if not, write to the Free Software Foundation, Inc., 51 |
| 23 | +Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 24 | + |
| 25 | +------------------------------------------------------------------------------- |
| 26 | +Last update : pyscard 1.6.0 (May 2007) |
| 27 | +------------------------------------------------------------------------------- |
| 28 | + |
| 29 | +pyscard is a python module adding smart cards support to python. |
| 30 | + |
| 31 | +It consists of the smartcard.scard module, an extension module wrapping Windows |
| 32 | +smart card base components (also known as PCSC) on Windows, and PCSC lite on |
| 33 | +linux, and of the smartcard module, a python framework hiding PCSC complexity. |
| 34 | + |
| 35 | + |
| 36 | +------------------------------------------------------------------------------- |
| 37 | +Documentation |
| 38 | +------------------------------------------------------------------------------- |
| 39 | + |
| 40 | +All documentation is provided in the smartcard/doc directory of the source |
| 41 | +distribution. Examples are provided in the smartcard/Examples directory of the |
| 42 | +source distribution. The binary distribution does not include any |
| 43 | +documentation, tests scripts or examples. |
| 44 | + |
| 45 | + |
| 46 | +------------------------------------------------------------------------------- |
| 47 | +Installation |
| 48 | +------------------------------------------------------------------------------- |
| 49 | + |
| 50 | +The pyscard library is packaged using the standard distutils python module. |
| 51 | + |
| 52 | +Installation on windows |
| 53 | +----------------------- |
| 54 | + |
| 55 | +Installing on windows from the binary distribution |
| 56 | +-------------------------------------------------- |
| 57 | + |
| 58 | +1. download the binary msi installer or self-executable installer |
| 59 | +2. execute the installer |
| 60 | + |
| 61 | +The binary msi installer and self-executable installer are packaged for a |
| 62 | +specific version of python, and have name similar to |
| 63 | +pyscard-1.6.0.win32-py2.5.msi and pyscard-1.6.0.win32-py2.5.exe for |
| 64 | +python 2.5. |
| 65 | + |
| 66 | + |
| 67 | +Installing on windows from the source distribution |
| 68 | +--------------------------------------------------- |
| 69 | + |
| 70 | +1. you will need swig 1.3.31 from http://www.swig.org, and a C compiler. |
| 71 | + |
| 72 | +By default, Visual Studio 2003 is required for building the c language wrapper |
| 73 | +for python 2.5, and Visual Studio .Net or VisualC++ 6 for python 2.4. You might |
| 74 | +use another release by fiddling with the python/Lib/distutils/msvccompiler.py |
| 75 | +file that detects the compiler. |
| 76 | + |
| 77 | +2. download the source distribution |
| 78 | + |
| 79 | +The source distribution is available as pyscard-1.6.0.zip for windows, |
| 80 | +and pyscard-1.6.0.tar.gz for linux. |
| 81 | + |
| 82 | +3. unzip the source distribution, open a console and type the following: |
| 83 | + |
| 84 | +setup.py build_ext install |
| 85 | + |
| 86 | +This will build pyscard and install it in the site-packages directory of |
| 87 | +your python distribution, e.g. c:\python25\Lib\site-packages\smartcard. |
| 88 | + |
| 89 | +This install procedure does not install the documentation, examples or test |
| 90 | +files. |
| 91 | + |
| 92 | +Installation on linux: |
| 93 | +---------------------- |
| 94 | + |
| 95 | +Installing on linux from the binary distribution: |
| 96 | +------------------------------------------------- |
| 97 | + |
| 98 | +1. download the binary distribution |
| 99 | + |
| 100 | +The binary distribution is either an archive file or a rpm file, with |
| 101 | +names similar to pyscard-1.6.0-1.i386.rpm for the rpm distribution, |
| 102 | +or pyscard-1.6.0.linux-i686.tar.gz for the archive distribution. |
| 103 | + |
| 104 | +2. untar the binary distribution |
| 105 | + |
| 106 | +With root privilege from a terminal, extract the archive from /, or |
| 107 | +install the rpm. |
| 108 | + |
| 109 | +Installing on linux from the source distribution |
| 110 | +------------------------------------------------ |
| 111 | + |
| 112 | +1. you will need gcc, swig 1.3.31 (http://www.swig.org), and pcsc-lite |
| 113 | +(http://pcsclite.alioth.debian.org/) |
| 114 | + |
| 115 | +2. download the source distribution |
| 116 | + |
| 117 | +The source distribution is available as pyscard-1.6.0.zip or |
| 118 | +pyscard-1.6.0.tar.gz. |
| 119 | + |
| 120 | +3. untar the source distribution |
| 121 | + |
| 122 | +4. from a terminal with root privileges, type the following: |
| 123 | + |
| 124 | +/usr/bin/python setup.py build_ext install |
| 125 | + |
| 126 | +This will build pyscard and install it in the site-packages directory of |
| 127 | +your python distribution, e.g. /usr/lib/python2.4/site-packages/smartcard. |
| 128 | + |
| 129 | + |
| 130 | +------------------------------------------------------------------------------- |
| 131 | +Developer documentation, unit tests and examples |
| 132 | +------------------------------------------------------------------------------- |
| 133 | +The developer documentation is in the smartcard/doc directory of the source |
| 134 | +distribution. |
| 135 | + |
| 136 | +Examples are located in the smartcard/Examples directory, and the pyunit unit |
| 137 | +tests in the smartcard/test directory. |
| 138 | + |
| 139 | +------------------------------------------------------------------------------- |
| 140 | +Build instructions for packagers |
| 141 | +------------------------------------------------------------------------------- |
| 142 | + |
| 143 | +Building a binary distribution for Windows |
| 144 | +------------------------------------------ |
| 145 | + |
| 146 | +To build a binary distribution from the source distribution, you will need a C |
| 147 | +compiler and swig 1.3.31 (same requirements as for installing from the source |
| 148 | +distribution). |
| 149 | + |
| 150 | +In the root directory of the source distribution, execute the following command |
| 151 | +in a console: |
| 152 | + |
| 153 | +setup.py build_ext bdist_msi |
| 154 | +setup.py build_ext bdist_wininst |
| 155 | + |
| 156 | +This will build the msi installer and self-executable installer in the dist |
| 157 | +directory, with names similar to pyscard-1.6.0.win32-py2.5.msi and |
| 158 | +pyscard-1.6.0.win32-py2.5.exe for python 2.5, and |
| 159 | +pyscard-1.6.0.win32-py2.4.msi and pyscard-1.6.0.win32-py2.4.exe for |
| 160 | +python 2.4. |
| 161 | + |
| 162 | +Building a binary distribution for linux |
| 163 | +---------------------------------------- |
| 164 | + |
| 165 | +To build a binary distribution from the source distribution, you will need |
| 166 | +gcc, swig 1.3.31 and pcsc-lite (same requirements as for installing from the |
| 167 | +source distribution). |
| 168 | + |
| 169 | +In the root directory of the source distribution, execute the following |
| 170 | +command in a terminal: |
| 171 | + |
| 172 | +/usr/bin/python setup.py build_ext bdist |
| 173 | + |
| 174 | +This will build a package similar to pyscard-1.6.0.linux-i686.tar.gz |
| 175 | +containing a tree |
| 176 | + |
| 177 | +Building a rpm distribution for linux |
| 178 | +---------------------------------------- |
| 179 | + |
| 180 | +To build a rpm distribution from the source distribution, you will need |
| 181 | +gcc, swig 1.3.31 and pcsc-lite (same requirements as for installing from the |
| 182 | +source distribution). |
| 183 | + |
| 184 | +In the root directory of the source distribution, execute the following |
| 185 | +command in a terminal: |
| 186 | + |
| 187 | +/usr/bin/python setup.py build bdist_rpm |
| 188 | + |
| 189 | +If you have rpm 4.1 or above, you will need to add the |
| 190 | +%_unpackaged_files_terminate_build 0 options to the /etc/rpm/macros file, |
| 191 | +e.g.: |
| 192 | + |
| 193 | +echo "%_unpackaged_files_terminate_build 0" >> /etc/rpm/macros |
| 194 | + |
| 195 | +This will build in the dist directory a binary distribution with a name |
| 196 | +similar to pyscard-1.6.0-1.i386.rpm. |
| 197 | + |
| 198 | + |
| 199 | +------------------------------------------------------------------------------- |
| 200 | +Issue Tracking |
| 201 | +------------------------------------------------------------------------------- |
| 202 | +If you encounter a bug, please report it in the SourceForge bug tracker at |
| 203 | + http://sourceforge.net/tracker/?group_id=196342&atid=957072 |
| 204 | + https://sourceforge.net/tracker/?group_id=196342&atid=957072 |
| 205 | + |
| 206 | + |
| 207 | +-jda |
0 commit comments