-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
53 lines (43 loc) · 1.24 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
import pathlib
from setuptools import find_packages, setup
from setuptools.command.develop import develop
from setuptools.command.install import install
def install_nltk_corpora():
"""Install NLTK word corpus and wordnet."""
import nltk
home_dir = pathlib.Path.home() / "nltk_data"
home_dir.mkdir(parents=True, exist_ok=True)
nltk.download("words", download_dir=home_dir)
nltk.download("wordnet", download_dir=home_dir)
class InstallNltkWordnetDuringInstall(install):
def run(self):
# Run the standard install process
install.run(self)
install_nltk_corpora()
class InstallNltkWordnetDuringDevelop(develop):
def run(self):
# Run the standard install process
develop.run(self)
install_nltk_corpora()
setup(
name="setlexsem",
packages=find_packages(),
install_requires=[
"tqdm",
"anthropic",
"boto3",
"nltk",
"tiktoken",
"openai",
"pandas",
"pyyaml",
],
extras_require={
"dev": ["check-manifest", "flake8", "black"],
"test": ["pytest", "coverage"],
},
cmdclass={
"install": InstallNltkWordnetDuringInstall,
"develop": InstallNltkWordnetDuringDevelop,
},
)