forked from GEM-benchmark/NL-Augmenter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
39 lines (30 loc) Β· 1.19 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
import os
from setuptools import setup
from TestRunner import OperationRuns
def all_folders():
folder_names = ["transformations/" + f for f in list(OperationRuns.get_all_folder_names())]
folder_names.extend(["filters/" + f for f in list(OperationRuns.get_all_folder_names("filters"))])
return folder_names
def read(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
data = f.read()
return data
def recursive_requirements():
# (1) read main requirements.txt
requirements = read("requirements.txt")
# (1) read all requirements.txt in the folder.
for folder in all_folders():
r_file = os.path.join(os.path.dirname(__file__), folder + "/requirements.txt")
if os.path.isfile(r_file):
with open(r_file) as f:
requirements += f.read() + "\n"
return requirements
setup(
name="NL-Augmenter",
version="0.0.1",
description="The official repository of transformations.",
long_description=read("README.md"),
install_requires=recursive_requirements(), # read("requirements.txt"),
package_data={"": ["*.json", "*.txt", "*.tsv", "*.csv", "*.npz", "*.ckpt"]},
include_package_data=True,
)