-from distutils.core import setup
+from setuptools import setup
setup(
name = 'djbdns-logparse',
keywords = 'djbdns, tinydns, dnscache',
scripts = ['bin/djbdns-logparse'],
packages = ['djbdns'],
- package_dir = {'djbdns': 'src/djbdns'},
+ package_dir = {'djbdns': 'djbdns'},
description = 'Convert tinydns and dnscache logs to human-readable form',
- license = 'doc/LICENSE'
+ test_suite = 'test.build_suite',
+ license = 'AGPLv3+'
)
--- /dev/null
+def build_suite():
+ from doctest import DocTestSuite
+ from unittest import TestSuite
+ import djbdns.common
+ import djbdns.dnscache
+ import djbdns.io
+ import djbdns.tinydns
+
+ tests = TestSuite()
+ tests.addTests(DocTestSuite(djbdns.common))
+ tests.addTests(DocTestSuite(djbdns.dnscache))
+ tests.addTests(DocTestSuite(djbdns.io))
+ tests.addTests(DocTestSuite(djbdns.tinydns))
+
+ return tests
--- /dev/null
+[testenv]
+commands =
+ python -m doctest -v djbdns/common.py
+ python -m doctest -v djbdns/dnscache.py
+ python -m doctest -v djbdns/io.py
+ python -m doctest -v djbdns/tinydns.py