forked from nikitakit/self-attentive-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
51 lines (46 loc) · 1.65 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
import setuptools
import sys
try:
from Cython.Build import cythonize
USE_CYTHON = True
except ImportError:
sys.exit("""Could not import Cython, which is required to build benepar extension modules.
Please install cython and numpy prior to installing benepar.""")
try:
import numpy as np
except ImportError:
sys.exit("""Could not import numpy, which is required to build the extension modules.
Please install cython and numpy prior to installing benepar.""")
with open("README.md", "r") as f:
long_description = f.read()
extensions = cythonize("benepar/*.pyx")
for ext_module in extensions:
ext_module.include_dirs.append(np.get_include())
setuptools.setup(
name="benepar",
version="0.0.3",
author="Nikita Kitaev",
author_email="[email protected]",
description="Berkeley Neural Parser",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/nikitakit/self-attentive-parser",
packages=setuptools.find_packages(),
package_data={'': ['*.pyx']},
ext_modules = cythonize(extensions),
classifiers=(
'Programming Language :: Python :: 2.7',
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Text Processing :: Linguistic",
),
setup_requires = ["cython", "numpy"],
install_requires = ["cython", "numpy", "nltk>=3.2"],
extras_require={
"cpu": ["tensorflow>=1.8.0"],
"gpu": ["tensorflow-gpu>=1.8.0"],
"spacy": ["spacy>=2.0.9"],
},
)