-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
49 lines (44 loc) · 1.4 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
from distutils.core import setup, Command
import os
import sys
sys.path.append('./tinysegmenter')
sys.path.append('./tests')
def read_file(filename):
filepath = os.path.join(
os.path.dirname(os.path.dirname(__file__)), filename)
if os.path.exists(filepath):
return open(filepath).read()
else:
return ''
class PyTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import sys,subprocess
errno = subprocess.call([sys.executable, 'runtests.py'])
raise SystemExit(errno)
setup(
name = 'tinysegmenter3',
packages = ['tinysegmenter'],
version = '0.1.0',
description = 'Super compact Japanese tokenizer',
maintainer = 'Tatsuro Yasukawa',
maintainer_email = '[email protected]',
url = 'https://github.com/SamuraiT/tinysegmenter',
license='New BSD',
long_description = read_file('README.md'),
cmdclass = {'test':PyTest},
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: BSD License",
"Environment :: MacOS X",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Text Processing :: Linguistic",
"Topic :: Software Development :: Libraries :: Python Modules",
],
)