This repository has been archived by the owner on Jun 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
70 lines (62 loc) · 2.02 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
#!/usr/bin/env python
import setuptools
import os, shutil
def copytree(src, dst):
os.makedirs(dst, exist_ok=True)
for item in os.listdir(src):
s = os.path.join(src, item)
d = os.path.join(dst, item)
if os.path.isdir(s):
copytree(s, d)
else:
shutil.copy(s, d)
def reqs_from_file(src):
requirements = []
with open(src) as f:
for line in f:
line = line.strip()
if not line.startswith("-r"):
requirements.append(line)
else:
add_src = line.split(' ')[1]
add_req = reqs_from_file(add_src)
requirements.extend(add_req)
return requirements
if __name__ == "__main__":
with open("docs/README.md", "r") as fh:
long_description = fh.read()
requirements=[]
wd = os.path.dirname(os.path.abspath(__file__))
copytree("preprocess/moses", os.path.join(wd, "bitextor/data/moses"))
requirements = reqs_from_file("requirements.txt")
setuptools.setup(
name="bitextor-neural",
version="1.0",
install_requires=requirements,
license="GNU General Public License v3.0",
#author=,
#author_email=,
#maintainer=,
#maintainer_email,
description="Bitextor generates translation memories from multilingual websites",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/bitextor/bitextor-neural",
packages=["bitextor", "bitextor.utils"],
#classifiers=[],
#project_urls={},
package_data={
"bitextor": [
"Snakefile",
"utils/clean-corpus-n.perl",
"vecalign/*",
"data/*",
]
},
entry_points={
"console_scripts": [
"bitextor-neural = bitextor.bitextor_cli:main",
"bitextor-neural-full = bitextor.bitextor_cli:main_full"
]
}
)