-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathsetup.py
59 lines (46 loc) · 1.64 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
# coding: utf-8
"""
Deci Dataset Analyzer
"""
from setuptools import setup
from setuptools import find_packages
README_LOCATION = "README.md"
REQ_LOCATION = "requirements.txt"
INIT_FILE = "src/data_gradients/__init__.py"
VERSION_FILE = "version.txt"
def readme():
"""print long description"""
with open(README_LOCATION, encoding="utf-8") as f:
return f.read()
def get_requirements():
with open(REQ_LOCATION, encoding="utf-8") as f:
requirements = f.read().splitlines()
return [r for r in requirements if not r.startswith("--") and not r.startswith("#")]
def get_version():
with open(VERSION_FILE, encoding="utf-8") as f:
ver = f.readline()
if ver.startswith("for"):
with open(INIT_FILE, encoding="utf-8") as f:
for line in f.readlines():
if line.startswith("__version__"):
ver = line.split()[-1].strip('"') + "+master"
return ver
setup(
name="data-gradients",
description="DataGradients",
version=get_version(),
author="Deci AI",
author_email="[email protected]",
url="https://github.com/Deci-AI/data-gradients",
keywords=["Deci", "AI", "Data", "Deep Learning", "Computer Vision", "PyTorch"],
install_requires=get_requirements(),
packages=find_packages(where="./src"),
package_dir={"": "src"},
package_data={
"data_gradients.config": ["*.yaml", "**/*.yaml"],
"data_gradients": ["example.ipynb", "requirements.txt"],
"data_gradients.assets": ["images/*.png", "html/*.html", "css/*.css", "text/*.txt"],
},
long_description=readme(),
long_description_content_type="text/markdown",
)