-
Notifications
You must be signed in to change notification settings - Fork 6
/
setup.py
45 lines (38 loc) · 1.21 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
import os
from distutils.util import convert_path
from setuptools import find_packages, setup
# read meta-data of the project
meta = {}
meta_path = convert_path("sentsplit/meta_data.py")
with open(meta_path) as meta_file:
exec(meta_file.read(), meta)
# read the contents README.md file
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, "README.md")) as f:
long_description = f.read()
def requirements():
reqfile = "requirements.txt"
with open(os.path.join(os.path.dirname(__file__), reqfile)) as f:
ret = []
for eachline in f.read().splitlines():
if eachline.startswith("-"):
continue
ret.append(eachline)
return ret
setup(
name="sentsplit",
version=meta["version"],
description=meta["description"],
long_description=long_description,
long_description_content_type="text/markdown",
author=meta["author"],
author_email=meta["author_email"],
url=meta["url"],
packages=find_packages(),
entry_points={
"console_scripts": ["sentsplit=sentsplit:main"],
},
include_package_data=True,
install_requires=requirements(),
python_requires=">=3.7",
)