Commits

Mikhail Korobov committed fa018e3

housekeeping; hello 0.6

  • Participants
  • Parent commits d2167db
  • Tags 0.6

Comments (0)

Files changed (5)

+Authors
+=======
+
+* Mikhail Korobov;
+* Stefan Klug.
-Copyright (c) 2012 Mikhail Korobov
+Copyright (c) 2013 Mikhail Korobov
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+THE SOFTWARE.
 #!/usr/bin/env python
 from distutils.core import setup
-from distutils.extension import Extension
-
 import sys
 
 for cmd in ('egg_info', 'develop'):
 
 setup_args = dict(
     name = 'packbits',
-    version = '0.5',
+    version = '0.6',
     author = 'Mikhail Korobov',
     author_email = 'kmike84@gmail.com',
     url = 'https://github.com/kmike/packbits',
 )
 
 setup(**setup_args)
-
-## ========== make extension optional (copied from coverage.py) =========
-#
-#compile_extension = True
-#
-#if sys.platform.startswith('java'):
-#    # Jython can't compile C extensions
-#    compile_extension = False
-#
-#if '__pypy__' in sys.builtin_module_names:
-#    # Cython extensions are slow under PyPy
-#    compile_extension = False
-#
-#if compile_extension:
-#    setup_args.update(dict(
-#        ext_modules = [
-#            Extension("_packbits", sources=["src/_packbits.c"])
-#        ],
-#    ))
-#
-## For a variety of reasons, it might not be possible to install the C
-## extension.  Try it with, and if it fails, try it without.
-#try:
-#    setup(**setup_args)
-#except:     # pylint: disable=W0702
-#    # When setup() can't compile, it tries to exit.  We'll catch SystemExit
-#    # here :-(, and try again.
-#    if 'install' not in sys.argv or 'ext_modules' not in setup_args:
-#        # We weren't trying to install an extension, so forget it.
-#        raise
-#    msg = "Couldn't install with extension module, trying without it..."
-#    exc = sys.exc_info()[1]
-#    exc_msg = "%s: %s" % (exc.__class__.__name__, exc)
-#    print("**\n** %s\n** %s\n**" % (msg, exc_msg))
-#
-#    del setup_args['ext_modules']
-#    setup(**setup_args)

File src/packbits.py

     pos = 0
     repeat_count = 0
     MAX_LENGTH = 127
-    #we can safely start with RAW as empty RAW sequences are handled by finish_raw()
+
+    # we can safely start with RAW as empty RAW sequences
+    # are handled by finish_raw()
     state = 'RAW'
 
     def finish_raw():

File test_packbits.py

 def test_encode2():
     encoded = packbits.encode(b'112112')
     assert packbits.decode(encoded) == b'112112'
-    
+
 def test_encode_switching_rle():
     encoded = packbits.encode(b'1122')
     assert packbits.decode(encoded) == b'1122'