setup.py
author Andrey Vlasovskikh <andrey.vlasovskikh@gmail.com>
Sat, 11 Sep 2010 15:16:24 +0400
changeset 119 f9c027029540
parent 95 5d92ba281fe8
child 145 6dc40423b257
permissions -rwxr-xr-x
Fixed catching unnececcary exceptions Exception Abort can't be thrown, so it is useless. Catching SystemExit and KeyboardInterrupt makes little sense as the thread can be terminated by KeyboardInterrupt before or after entering the wrapped command processing function. So one have to handle these exceptions in his main function anyway. Catching any exception in order to print a message and re-raise it changes the standard behaviour and might seem confusing.

#!/usr/bin/env python

import os
from setuptools import setup
import opster

def read(fname):
    return open(os.path.join(os.path.dirname(__file__), fname)).read()

def desc():
    info = read('README')
    try:
        return info + '\n\n' + read('docs/changelog.rst')
    except IOError:
        # no docs
        return info

setup(
    name = 'opster',
    description = 'command line parsing speedster',
    long_description = desc(),
    license = 'BSD',
    version = opster.__version__,
    author = opster.__author__,
    author_email = opster.__email__,
    url = 'http://hg.piranha.org.ua/opster/',
    classifiers = [
        'Development Status :: 4 - Beta',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Software Development',
        ],
    py_modules = ['opster'],
    platforms='any',
    )