forked from pytries/marisa-trie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·76 lines (68 loc) · 2.39 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
#! /usr/bin/env python
"""Static memory-efficient and fast Trie-like structures for Python."""
import glob
import itertools
import os.path
from setuptools import setup, Extension
MARISA_ROOT_DIR = "marisa-trie"
MARISA_SOURCE_DIR = os.path.join(MARISA_ROOT_DIR, "lib")
MARISA_INCLUDE_DIR = os.path.join(MARISA_ROOT_DIR, "include")
MARISA_FILES = [
"marisa/*.cc",
"marisa/grimoire.cc",
"marisa/grimoire/io/*.cc",
"marisa/grimoire/trie/*.cc",
"marisa/grimoire/vector/*.cc",
]
MARISA_FILES[:] = itertools.chain(
*(glob.glob(os.path.join(MARISA_SOURCE_DIR, path))
for path in MARISA_FILES))
DESCRIPTION = __doc__
LONG_DESCRIPTION = open("README.rst").read() + open("CHANGES.rst").read()
LICENSE = "MIT"
CLASSIFIERS = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Cython",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Text Processing :: Linguistic",
]
setup(name="marisa-trie",
version="0.7.2",
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
author="Mikhail Korobov",
license=LICENSE,
url="https://github.com/kmike/marisa-trie",
classifiers=CLASSIFIERS,
libraries=[("libmarisa-trie", {
"sources": MARISA_FILES,
"include_dirs": [MARISA_SOURCE_DIR, MARISA_INCLUDE_DIR]
})],
ext_modules=[
Extension("marisa_trie", [
"src/agent.cpp",
"src/base.cpp",
"src/iostream.cpp",
"src/key.cpp",
"src/keyset.cpp",
"src/marisa_trie.cpp",
"src/query.cpp",
"src/std_iostream.cpp",
"src/trie.cpp"
], include_dirs=[MARISA_INCLUDE_DIR])
],
setup_requires=["pytest-runner"],
tests_require=["pytest", "hypothesis==2.0"])