Merge pull request #1 from mminer/master
[third_party/extras] / setup.py
1 #!/usr/bin/env python
2 """Distutils installer for extras."""
3
4 from setuptools import setup
5 import os.path
6
7 import extras
8 testtools_cmd = extras.try_import('testtools.TestCommand')
9
10
11 def get_version():
12     """Return the version of extras that we are building."""
13     version = '.'.join(
14         str(component) for component in extras.__version__[0:3])
15     return version
16
17
18 def get_long_description():
19     readme_path = os.path.join(
20         os.path.dirname(__file__), 'README.rst')
21     return open(readme_path).read()
22
23
24 cmdclass = {}
25
26 if testtools_cmd is not None:
27     cmdclass['test'] = testtools_cmd
28
29
30 setup(name='extras',
31       author='Testing cabal',
32       author_email='testtools-dev@lists.launchpad.net',
33       url='https://github.com/testing-cabal/extras',
34       description=('Useful extra bits for Python - things that shold be '
35         'in the standard library'),
36       long_description=get_long_description(),
37       version=get_version(),
38       classifiers=[
39         "Intended Audience :: Developers",
40         "License :: OSI Approved :: MIT License",
41         "Programming Language :: Python",
42         "Programming Language :: Python :: 3",
43         ],
44       packages=[
45         'extras',
46         'extras.tests',
47         ],
48       cmdclass=cmdclass)