summaryrefslogtreecommitdiffstats
path: root/lib/extras/setup.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2014-10-25 11:09:10 -0700
committerJelmer Vernooij <jelmer@samba.org>2014-11-22 02:23:10 +0100
commita92877f955baf0ed8420f77898bd4405bd319c67 (patch)
tree2f109ad367509cb7fb9f66eadfd3d33457c80b4c /lib/extras/setup.py
parent3949ed67fcb51a88972f89e9a1c9d674b16c8e9a (diff)
downloadsamba-a92877f955baf0ed8420f77898bd4405bd319c67.tar.gz
samba-a92877f955baf0ed8420f77898bd4405bd319c67.tar.xz
samba-a92877f955baf0ed8420f77898bd4405bd319c67.zip
Add bundled copy of 'extras' python module used by newer versions of testtools/subunit.
Change-Id: I5ad9222ccb4228a4b16d54a578276d4b9d4e6c4d Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/extras/setup.py')
-rwxr-xr-xlib/extras/setup.py48
1 files changed, 48 insertions, 0 deletions
diff --git a/lib/extras/setup.py b/lib/extras/setup.py
new file mode 100755
index 0000000000..56612d00b9
--- /dev/null
+++ b/lib/extras/setup.py
@@ -0,0 +1,48 @@
+#!/usr/bin/env python
+"""Distutils installer for extras."""
+
+from setuptools import setup
+import os.path
+
+import extras
+testtools_cmd = extras.try_import('testtools.TestCommand')
+
+
+def get_version():
+ """Return the version of extras that we are building."""
+ version = '.'.join(
+ str(component) for component in extras.__version__[0:3])
+ return version
+
+
+def get_long_description():
+ readme_path = os.path.join(
+ os.path.dirname(__file__), 'README.rst')
+ return open(readme_path).read()
+
+
+cmdclass = {}
+
+if testtools_cmd is not None:
+ cmdclass['test'] = testtools_cmd
+
+
+setup(name='extras',
+ author='Testing cabal',
+ author_email='testtools-dev@lists.launchpad.net',
+ url='https://github.com/testing-cabal/extras',
+ description=('Useful extra bits for Python - things that shold be '
+ 'in the standard library'),
+ long_description=get_long_description(),
+ version=get_version(),
+ classifiers=[
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: MIT License",
+ "Programming Language :: Python",
+ "Programming Language :: Python :: 3",
+ ],
+ packages=[
+ 'extras',
+ 'extras.tests',
+ ],
+ cmdclass=cmdclass)