forked from stanfordnlp/stanza-old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
86 lines (65 loc) · 2.47 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
__author__ = 'victor, wmonroe4, kelvinguu'
from setuptools import setup, Command, find_packages
class UnitTest2(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import subprocess
errno = subprocess.call(['python2', '-m', 'pytest', '--doctest-modules',
'--ignore=stanza/research/pick_gpu.py',
'--ignore=stanza/research/progress.py',
'--ignore=stanza/research/summary.py',
'--ignore=stanza/research/templates/third-party',
'stanza', 'test/unit_tests'])
raise SystemExit(errno)
class UnitTest3(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import subprocess
errno = subprocess.call(['python3', '-m', 'pytest', '--doctest-modules',
'--ignore=stanza/research/pick_gpu.py',
'--ignore=stanza/research/progress.py',
'--ignore=stanza/research/summary.py',
'--ignore=stanza/research/templates/third-party',
'stanza', 'test/unit_tests'])
raise SystemExit(errno)
class SlowTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import subprocess
errno = subprocess.call(['py.test', '--doctest-modules', 'test/slow_tests'])
raise SystemExit(errno)
class AllTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import subprocess
errno = subprocess.call(['py.test', '--doctest-modules'])
raise SystemExit(errno)
setup(
name='stanza',
version='0.3',
packages=find_packages(exclude=['docs', 'test']),
url='https://github.com/stanfordnlp/stanza',
license='MIT',
author='Stanford NLP',
author_email='victor@victorzhong.com',
description='NLP library for Python',
cmdclass={'test': UnitTest2, 'test3' : UnitTest3, 'slow_test': SlowTest, 'all_test': AllTest},
download_url='https://github.com/stanfordnlp/stanza/tarball/0.1',
keywords=['nlp', 'neural networks', 'machine learning'],
)