Commits

Miki Tebeka committed 0862356

Make it a project

  • Participants
  • Parent commits 1983fa8
  • Tags 0.1.0

Comments (0)

Files changed (4)

 
 The Python world of things is not that organized, so iocp.copy will try to do a
 best guess about which are the right function to call when reading and writing.
+
+For example, checking md5 signature of a file::
+
+    md5 = hashlib.md5()
+    with open('/path/to/file') as fo:
+        iocp(fo, md5)
+    print md5.hexdigest()
 '''
 
+__version__ = '0.1.0'
+
 READ_FNS = [
     'read',  # file, StringIO ...
     'recv',  # socket
     'update',  # hashlib ...
 ]
 
-BUFSIZE = 32*1024
+# Default buffer size
+BUFSIZE = 32 * 1024
 
 
 def find_fn(obj, names, name):
+#!/bin/bash
+# Push to pypi, tag and push to bitbucket
+
+python setup.py sdist upload
+rm -fr build dist
+hg tag -f $(python setup.py --version)
+hg push

File run-tests.sh

 #!/bin/bash
+# Run tests suite, you can specify which nose to run by setting environment
+# variable `nose` (running without will use `nosetests`).
+#   nose=nosetests-3.2 ./run-tests.sh
 
-nosetests -vd $@
+echo "[$(date)] Running tests on $(hostname) [user=${USER}, pwd=${PWD}]"
+echo
+
+nose=${nose-nosetests}
+echo "nose is $nose"
+
+
+$nose -vd $@
+from setuptools import setup
+import iocp
+
+setup(
+    name='iocp',
+    version=iocp.__version__,
+    description='A back door to servers.',
+    long_description=iocp.__doc__,
+    author='Miki Tebeka',
+    author_email='miki.tebeka@gmail.com',
+    url='https://bitbucket.org/tebeka/iocp/src',
+    license='MIT License',
+    platforms=['any'],
+    zip_safe=True,
+    py_modules=['iocp']
+)