-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
66 lines (53 loc) · 1.63 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
import codecs
import os
from setuptools import find_packages, setup
NAME = "saliency_estimation"
DESCRIPTION = "Python library to estimate saliency"
with open("README.md", "r") as f:
LONG_DESCRIPTION = f.read()
PROJECT = os.path.abspath(os.path.dirname(__file__))
EXCLUDE = ()
VERSION = "0.1.0"
AUTHOR = "Society for Artificial Intelligence and Deep Learning"
EMAIL = "[email protected]"
LICENSE = "MIT"
REPO_URL = "https://github.com/SforAiDl/saliency_estimation"
PROJECT_URLS = {"Source": REPO_URL}
CLASSIFIERS = (
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
)
def read(*parts):
"""
returns contents of file
"""
with codecs.open(os.path.join(PROJECT, *parts), "rb", "utf-8") as file:
return file.read()
def get_requires(path):
"""
generates requirements from file path given as REQUIRE_PATH
"""
for line in read(path).splitlines():
line = line.strip()
if line and not line.startswith("#"):
yield line
INSTALL_REQUIRES = list(get_requires("requirements.txt"))
CONFIG = {
"name": NAME,
"description": DESCRIPTION,
"long_description": LONG_DESCRIPTION,
"long_description_content_type": "text/markdown",
"packages": find_packages(where=PROJECT, exclude=EXCLUDE),
"version": VERSION,
"author": AUTHOR,
"author_email": EMAIL,
"license": LICENSE,
"url": REPO_URL,
"project_urls": PROJECT_URLS,
"classifiers": CLASSIFIERS,
"install_requires": INSTALL_REQUIRES,
"python_requires": ">=3.6",
}
if __name__ == "__main__":
setup(**CONFIG)