-
Notifications
You must be signed in to change notification settings - Fork 15
/
setup.py
55 lines (51 loc) · 1.79 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
#!/usr/bin/env python3
from setuptools import setup
from distutils.extension import Extension
# Delayed import; https://stackoverflow.com/questions/37471313/setup-requires-with-cython
try:
from Cython.Build import cythonize
except ImportError:
def cythonize(*args, **kwargs):
from Cython.Build import cythonize
return cythonize(*args, **kwargs)
# import os
# os.environ['CFLAGS'] = '-O0'
try:
long_description = open("README.md", encoding="utf8").read()
except IOError:
long_description = ""
setup(
version="1.9",
description="High performance Trie and Ahocorasick automata (AC automata) for python",
name="cyac",
url="https://github.com/nppoly/cyac",
author="nppoly",
author_email="nppoly@foxmail.com",
packages=["cyac"],
package_dir={'cyac': 'lib/cyac'},
package_data={'cyac': ['*.pxd', 'cyac/unicode_portability.c']},
include_package_data=True,
long_description_content_type="text/markdown",
long_description=long_description,
install_requires=['cython>=0.29.0', 'Cython>=0.29.0'],
setup_requires=['Cython'],
ext_modules = cythonize([
"lib/cyac/util.pyx",
"lib/cyac/utf8.pyx",
"lib/cyac/xstring.pyx",
"lib/cyac/trie.pyx",
"lib/cyac/ac.pyx"]),
classifiers=[
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
"Programming Language :: Python",
"Topic :: Text Processing",
"Topic :: Text Processing :: Linguistic",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
]
)