forked from delph-in/pydelphin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·47 lines (40 loc) · 1.32 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env python3
from unittest import TextTestRunner, TestLoader
from glob import glob
from os.path import splitext, basename, join as pjoin
import os
from distutils.core import setup, Command
# thanks: http://da44en.wordpress.com/2002/11/22/using-distutils/
class TestCommand(Command):
description='run unit tests'
user_options = [ ]
def initialize_options(self):
self._dir = os.getcwd()
def finalize_options(self):
pass
def run(self):
'''
Finds all the tests modules in tests/, and runs them.
'''
testfiles = [ ]
for t in glob(pjoin(self._dir, 'tests', '*.py')):
if not t.endswith('__init__.py'):
testfiles.append('.'.join(
['tests', splitext(basename(t))[0]])
)
tests = TestLoader().loadTestsFromNames(testfiles)
t = TextTestRunner(verbosity = 1)
t.run(tests)
setup(
name='pyDelphin',
version='0.2',
url='https://github.com/goodmami/pydelphin',
author='Michael Wayne Goodman',
author_email='[email protected]',
description='Libraries and scripts for DELPH-IN data.',
packages=['delphin','delphin.interfaces','delphin.mrs','delphin.extra','delphin.codecs'],
cmdclass={'test':TestCommand},
install_requires=[
'networkx',
]
)