Michael Foord | 1e68bec | 2012-03-03 22:24:30 +0000 | [diff] [blame] | 1 | #! /usr/bin/env python |
| 2 | |
| 3 | # Copyright (C) 2007-2012 Michael Foord & the mock team |
| 4 | # E-mail: fuzzyman AT voidspace DOT org DOT uk |
| 5 | # http://www.voidspace.org.uk/python/mock/ |
| 6 | |
| 7 | from mock import __version__ |
| 8 | |
| 9 | import os |
| 10 | |
| 11 | |
| 12 | NAME = 'mock' |
| 13 | MODULES = ['mock'] |
| 14 | DESCRIPTION = 'A Python Mocking and Patching Library for Testing' |
| 15 | |
| 16 | URL = "http://www.voidspace.org.uk/python/mock/" |
| 17 | |
| 18 | readme = os.path.join(os.path.dirname(__file__), 'README.txt') |
| 19 | LONG_DESCRIPTION = open(readme).read() |
| 20 | |
| 21 | CLASSIFIERS = [ |
| 22 | 'Development Status :: 5 - Production/Stable', |
| 23 | 'Environment :: Console', |
| 24 | 'Intended Audience :: Developers', |
| 25 | 'License :: OSI Approved :: BSD License', |
| 26 | 'Programming Language :: Python', |
| 27 | 'Programming Language :: Python :: 2', |
| 28 | 'Programming Language :: Python :: 3', |
| 29 | 'Programming Language :: Python :: 2.4', |
| 30 | 'Programming Language :: Python :: 2.5', |
| 31 | 'Programming Language :: Python :: 2.6', |
| 32 | 'Programming Language :: Python :: 2.7', |
| 33 | 'Programming Language :: Python :: 3.1', |
| 34 | 'Programming Language :: Python :: 3.2', |
| 35 | 'Programming Language :: Python :: Implementation :: CPython', |
| 36 | 'Programming Language :: Python :: Implementation :: PyPy', |
| 37 | 'Programming Language :: Python :: Implementation :: Jython', |
| 38 | 'Operating System :: OS Independent', |
| 39 | 'Topic :: Software Development :: Libraries', |
| 40 | 'Topic :: Software Development :: Libraries :: Python Modules', |
| 41 | 'Topic :: Software Development :: Testing', |
| 42 | ] |
| 43 | |
| 44 | AUTHOR = 'Michael Foord' |
| 45 | AUTHOR_EMAIL = 'michael@voidspace.org.uk' |
| 46 | KEYWORDS = ("testing test mock mocking unittest patching " |
| 47 | "stubs fakes doubles").split(' ') |
| 48 | |
| 49 | params = dict( |
| 50 | name=NAME, |
| 51 | version=__version__, |
| 52 | py_modules=MODULES, |
| 53 | |
| 54 | # metadata for upload to PyPI |
| 55 | author=AUTHOR, |
| 56 | author_email=AUTHOR_EMAIL, |
| 57 | description=DESCRIPTION, |
| 58 | long_description=LONG_DESCRIPTION, |
| 59 | keywords=KEYWORDS, |
| 60 | url=URL, |
| 61 | classifiers=CLASSIFIERS, |
| 62 | ) |
| 63 | |
| 64 | try: |
| 65 | from setuptools import setup |
| 66 | except ImportError: |
| 67 | from distutils.core import setup |
| 68 | else: |
| 69 | params['tests_require'] = ['unittest2'] |
| 70 | params['test_suite'] = 'unittest2.collector' |
| 71 | |
| 72 | setup(**params) |