setup.py 1.8 KB

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