Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Other cleanup #4

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
565db70
Remove support for Python releases older than 2.6
moreati Jun 19, 2015
ac3eb31
Consolidate build platform logic
moreati Jun 19, 2015
3bca937
Standardise Trove classifiers, declare OS & Python support
moreati Jun 19, 2015
119b0f2
Correct package declarations, include smartcard.pyro
moreati Jun 19, 2015
a72aa55
Switch from distutils to setuptools
moreati Jun 19, 2015
20c77ff
Add gitignore for build artefacts
moreati Jun 19, 2015
7d36645
Initial attempt at CI builds on Windows, using appveyor.com
moreati Jun 19, 2015
7b0005e
Missing comment
moreati Jun 19, 2015
88c556c
Download and install Swig in CI build
moreati Jun 19, 2015
1375471
Merge branch 'master' of github.com:moreati/pyscard
moreati Jun 20, 2015
af2c0e0
First attempt at Travis CI
moreati Jun 20, 2015
31241d9
Correct travis dependcy installation
moreati Jun 20, 2015
17feb6c
sudo helps when running apt-get
moreati Jun 20, 2015
cae9467
gitignore the config generated by the test suite
moreati Jun 22, 2015
370427c
Remove all but two uses of 'except:' & 'except Exception:'
moreati Jun 22, 2015
bedaf68
Commit convert docstring examples to doctest syntax
moreati Jun 22, 2015
7479bf1
Add default pylint config
moreati Jun 22, 2015
7b25b21
Customize pylintrc
moreati Jun 22, 2015
e1bba4b
Fix most major pylint errors and warnings
moreati Jun 22, 2015
173d961
Merge branch 'master' of github.com:LudovicRousseau/pyscard
moreati Jun 22, 2015
568d577
Consolidate Changelog, LICENSE, README etc into root dir. Delete PKG-…
moreati Jun 23, 2015
5c50b3f
Remove code supporting OS X Tiger
moreati Jun 23, 2015
fdadf6e
Reformat functions/attributes supported by `smartcard.scard` as tables
moreati Jun 23, 2015
2fb346a
Consolidate the project version in setup.py, bump to 1.7.0
moreati Jun 23, 2015
c6c442f
Merge branch 'master' of github.com:LudovicRousseau/pyscard
moreati Jun 26, 2015
2d0018b
Build Windows .exe and .msi installers
moreati Jun 28, 2015
4b639d3
README.md: Add a Continuous Integration status
LudovicRousseau Jun 26, 2015
86589a9
README.md: Add AppVeyor icon
LudovicRousseau Jun 26, 2015
907ffa2
README.md: Update travis-ci link
LudovicRousseau Jun 26, 2015
0897480
README.md: Correct Travis CI capitalisation
LudovicRousseau Jun 26, 2015
d0b7415
README.md: fix typo in Travis name
LudovicRousseau Jun 26, 2015
d552dba
configcheck.py: close file after use
LudovicRousseau Jun 27, 2015
734c8e6
Release 1.7.0
LudovicRousseau Jun 27, 2015
e30f9f8
ChangeLog: fix typos and reformat
LudovicRousseau Jun 27, 2015
cd82b30
setup.py: fix classifiers to conform to pypi
Jun 28, 2015
06a3a92
Remove support for Python releases older than 2.6
moreati Jun 19, 2015
7eee767
Consolidate build platform logic
moreati Jun 19, 2015
578da23
Standardise Trove classifiers, declare OS & Python support
moreati Jun 19, 2015
bb11fd6
Add gitignore for build artefacts
moreati Jun 19, 2015
4baa14d
Remove all but two uses of 'except:' & 'except Exception:'
moreati Jun 22, 2015
b64ec04
Fix most major pylint errors and warnings
moreati Jun 22, 2015
c9fa486
Merge branch 'master' of github.com:moreati/pyscard
moreati Jun 29, 2015
3e2f200
Revert differences to upstream@81bfc15
moreati Jun 29, 2015
b01c51d
Fix undefined variable errors found by pylint
moreati Jun 29, 2015
68f5f42
Fix missing usage of raw string
moreati Jun 29, 2015
b0f49f6
Remove no-effect loop
moreati Jun 29, 2015
9ec8fae
Fix name clash between PyroDaemonThread and threading.Thread
moreati Jun 29, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Consolidate the project version in setup.py, bump to 1.7.0
  • Loading branch information
moreati committed Jun 23, 2015
commit 2fb346a33c7c16827cb571b3ba76db038618ca8e
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
1.7.0 (TBD)
===========
* dropped support for Python 2.5 and earlier (Alex Willmer)
* dropped support for OS X 10.5 (Leopard) and earlier (Alex Willmer)


1.6.16 (December 2014)
===================
* added support for windows 64bit amd64 (Jean-Daniel Aussel)
Expand Down
217 changes: 47 additions & 170 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,11 @@ 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.16 (Decembre 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
PCSC lite on linux and OS X, and of the smartcard module, a
python framework with objects wrapping PCSC API.


Expand Down Expand Up @@ -63,24 +59,22 @@ Installing on windows from the binary distribution

The binary msi installer and self-executable installer are packaged for
a specific version of python, and have name similar to
pyscard-1.6.16.win32-py2.5.msi and pyscard-1.6.16.win32-py2.5.exe for
python 2.5.
pyscard-1.7.<xx>.win32-py2.7.msi and pyscard-1.7.<xx>.win32-py2.7.exe.


Installing on windows from the source distribution
---------------------------------------------------

1. you will need swig 1.3.31 from http:https://www.swig.org, and a C compiler.
1. you will need swig from (http:https://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.
Visual Studio 2008 is required for building the C language wrapper. You can
download Microsoft Visual C++ Compiler for Python 2.7
(http:https://aka.ms/vcpython27).

2. download the source distribution

The source distribution is available as pyscard-1.6.16.zip for windows,
and pyscard-1.6.16.tar.gz for linux.
The source distribution is available as pyscard-1.7.<xx>.zip for windows,
and pyscard-1.7.<xx>.tar.gz for linux.

3. unzip the source distribution, open a console and type the following:

Expand All @@ -101,8 +95,8 @@ 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.16-1.i386.rpm for the rpm distribution, or
pyscard-1.6.16.linux-i686.tar.gz for the archive distribution.
names similar to pyscard-1.7.<xx>-1.i386.rpm for the rpm distribution, or
pyscard-1.7.<xx>.linux-i686.tar.gz for the archive distribution.

2. untar the binary distribution

Expand All @@ -112,13 +106,13 @@ install the rpm.
Installing on linux from the source distribution
------------------------------------------------

1. you will need gcc, swig 1.3.31 (http:https://www.swig.org), and pcsc-lite
1. you will need gcc, swig (http:https://www.swig.org), and pcsc-lite
(http:https://pcsclite.alioth.debian.org/)

2. download the source distribution

The source distribution is available as pyscard-1.6.16.zip or
pyscard-1.6.16.tar.gz.
The source distribution is available as pyscard-1.7.<xx>.zip or
pyscard-1.7.<xx>.tar.gz.

3. untar the source distribution

Expand All @@ -128,42 +122,31 @@ pyscard-1.6.16.tar.gz.

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:
--------------------------------
/usr/lib/python2.7/site-packages/smartcard.

The Mac OS X Tiger support is experimental on pyscard 1.6.16. It was
developed and tested on a i386 MacBook Pro. Please drop me a mail if you
succeed on a ppc MacBook.
Installation on Max OS X Snow Leopard:
--------------------------------------

Installing on Mac OS X Tiger from the binary distribution:
----------------------------------------------------
Installing on Mac OS X Snow 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.16-py-2.3-macosx10.4.mpkg or
pyscard-1.6.16-py-2.5-macosx10.4.mpkg.
pyscard-1.7.<xx>-py-2.6-macosx10.6.mpkg.

2. Open the package and proceed with installation.

Python 2.3 is pre-installed, so install
pyscard-1.6.16-py-2.3-macosx10.4.mpkg if you did not install another
release of python.
Installing on Mac OS X Snow Leopard from the source distribution
----------------------------------------------------------------

Install pyscard-1.6.16-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:https://www.swig.org); gcc and pcsc-lite
are available out of the box on Max OS X Tiger
1. you will need swig (http:https://www.swig.org); gcc and pcsc-lite
are available out of the box on Max OS X Snow Leopard

2. download the source distribution

The source distribution is available as pyscard-1.6.16.zip or
pyscard-1.6.16.tar.gz.
The source distribution is available as pyscard-1.7.<xx>.zip or
pyscard-1.7.<xx>.tar.gz.

3. untar or unzip the source distribution

Expand All @@ -173,42 +156,7 @@ 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.16-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:https://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.16.zip or
pyscard-1.6.16.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
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.3/lib/site-packages/smartcard


Installation on Max OS X Lion:
Expand All @@ -220,21 +168,21 @@ 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.16-py-2.7-macosx10.7.mpkg.
pyscard-1.7.<xx>-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:https://www.swig.org) and Xcode
1. you will need swig (http:https://www.swig.org) and Xcode
(http:https://developer.apple.com/xcode/);
pcsc-lite is available out of the box on Max OS X Leopard
pcsc-lite is available out of the box on Max OS X

2. download the source distribution

The source distribution is available as pyscard-1.6.16.zip or
pyscard-1.6.16.tar.gz.
The source distribution is available as pyscard-1.7.<xx>.zip or
pyscard-1.7.<xx>.tar.gz.

3. untar or unzip the source distribution

Expand Down Expand Up @@ -263,7 +211,7 @@ 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
need a C compiler and swig (same requirements as for installing
from the source distribution).

In the root directory of the source distribution, execute the following
Expand All @@ -273,31 +221,29 @@ 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.16.win32-py2.5.msi and
pyscard-1.6.16.win32-py2.5.exe for python 2.5, and
pyscard-1.6.16.win32-py2.4.msi and pyscard-1.6.16.win32-py2.4.exe for
python 2.4.
dist directory, with names similar to pyscard-1.7.<xx>.win32-py2.7.msi and
pyscard-1.7.<xx>.win32-py2.7.exe.

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
need gcc, swig 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.16.linux-i686.tar.gz
This will build a package similar to pyscard-1.7.<xx>.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
gcc, swig and pcsc-lite (same requirements as for installing from
the source distribution).

In the root directory of the source distribution, execute the following
Expand All @@ -312,41 +258,14 @@ 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.16-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:https://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.16-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.16-py-2.6-macosx10.4.mpkg.

similar to pyscard-1.7.<xx>-1.i386.rpm.

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:https://pypi.python.org/pypi/bdist_mpkg/).
need swig and Xcode (same requirements as for installing from the source
distribution) and bdist_mpkg 0.5.0+ (http:https://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
Expand All @@ -358,74 +277,32 @@ 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.16-py-2.7-macosx10.7.mpkg in the dist
This will build package pyscard-1.7.<xx>-py-2.7-macosx10.7.mpkg in the dist
directory.

Building a binary distribution for Mac OS X Leopard
---------------------------------------------------
Building a binary distribution for Mac OS X Snow 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:https://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.
need swig (same requirements as for installing from the source
distribution) and bdist_mpkg 0.5.0+ (https://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.

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.16-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.16-py-2.6-macosx10.5.mpkg.
This will build package pyscard-1.7.<xx>-py-2.6-macosx10.6.mpkg.

-------------------------------------------------------------------------------
Issue Tracking
-------------------------------------------------------------------------------
If you encounter a bug, please report it in the SourceForge bug tracker at
http:https://sourceforge.net/tracker/?group_id=196342&atid=957072
https://sourceforge.net/tracker/?group_id=196342&atid=957072

https://sourceforge.net/p/pyscard/bugs/

-jda
Loading