diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cbfc98e --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +*.pyc +*.pyo +*.egg-info +__pycache__ +bin +build +develop-eggs +dist +eggs +parts +.DS_Store +.installed.cfg +docs/_build +cover/ +.tox +*.bak +*.c +*.so +venv/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b141cdb --- /dev/null +++ b/LICENSE @@ -0,0 +1,14 @@ +Copyright (c) 2014, Hsiaoming Yang + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +* Neither the name of the creator nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..aa45a8a --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,3 @@ +include LICENSE +include README.rst +recursive-include captcha/data *.wav diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..40d23b9 --- /dev/null +++ b/README.rst @@ -0,0 +1,2 @@ +Captcha +======= diff --git a/captcha/__init__.py b/captcha/__init__.py index e69de29..0cf469c 100644 --- a/captcha/__init__.py +++ b/captcha/__init__.py @@ -0,0 +1,15 @@ +# coding: utf-8 + +""" + Captcha + ~~~~~~~ + + A captcha library that generates audio and image CAPTCHAs. + + :copyright: (c) 2014 by Hsiaoming Yang. + :license: BSD, see LICENSE for more details. +""" + +__version__ = '0.1' +__author__ = 'Hsiaoming Yang ' +__homepage__ = 'https://github.com/lepture/captcha' diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..e1c7e49 --- /dev/null +++ b/setup.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +kwargs = {} + +try: + from setuptools import setup +except ImportError: + from distutils.core import setup + +import captcha +from email.utils import parseaddr +author, author_email = parseaddr(captcha.__author__) + + +def fopen(filename): + with open(filename) as f: + return f.read() + + +setup( + name='captcha', + version=captcha.__version__, + author=author, + author_email=author_email, + url=captcha.__homepage__, + packages=['captcha'], + description=captcha.__doc__, + long_description=fopen('README.rst'), + license='BSD', + zip_safe=False, + include_package_data=True, + classifiers=[ + 'Development Status :: 4 - Beta', + 'Environment :: Console', + 'Intended Audience :: Developers', + 'License :: OSI Approved', + 'License :: OSI Approved :: BSD License', + 'Operating System :: MacOS', + 'Operating System :: POSIX', + 'Operating System :: POSIX :: Linux', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2.6', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: Implementation', + 'Programming Language :: Python :: Implementation :: CPython', + 'Programming Language :: Python :: Implementation :: PyPy', + ], + **kwargs +)