1#!/usr/bin/env python 2from setuptools import setup 3import re 4import sys 5 6def load_version(filename='funcsigs/version.py'): 7 "Parse a __version__ number from a source file" 8 with open(filename) as source: 9 text = source.read() 10 match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", text) 11 if not match: 12 msg = "Unable to find version number in {}".format(filename) 13 raise RuntimeError(msg) 14 version = match.group(1) 15 return version 16 17 18setup( 19 name="funcsigs", 20 version=load_version(), 21 packages=['funcsigs'], 22 zip_safe=False, 23 author="Testing Cabal", 24 author_email="testing-in-python@lists.idyll.org", 25 url="http://funcsigs.readthedocs.org", 26 description="Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+", 27 long_description=open('README.rst').read(), 28 license="ASL", 29 extras_require = { 30 ':python_version<"2.7"': ['ordereddict'], 31 }, 32 setup_requires = ["setuptools>=17.1"], 33 classifiers = [ 34 'Development Status :: 4 - Beta', 35 'Intended Audience :: Developers', 36 'License :: OSI Approved :: Apache Software License', 37 'Operating System :: OS Independent', 38 'Programming Language :: Python', 39 'Programming Language :: Python :: 2', 40 'Programming Language :: Python :: 2.6', 41 'Programming Language :: Python :: 2.7', 42 'Programming Language :: Python :: 3', 43 'Programming Language :: Python :: 3.3', 44 'Programming Language :: Python :: 3.4', 45 'Programming Language :: Python :: 3.5', 46 'Programming Language :: Python :: Implementation :: CPython', 47 'Programming Language :: Python :: Implementation :: PyPy', 48 'Topic :: Software Development :: Libraries :: Python Modules' 49 ], 50 tests_require = ['unittest2'], 51 test_suite = 'unittest2.collector', 52) 53