-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathsetup.py
More file actions
48 lines (43 loc) · 1.59 KB
/
setup.py
File metadata and controls
48 lines (43 loc) · 1.59 KB
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
# Copyright (c) 2018 LG Electronics Inc.
# SPDX-License-Identifier: GPL-3.0-or-later
from setuptools import setup, find_packages
BASE_URL="https://github.com/LGE-ARC-AdvancedAI/auptimizer"
CONSOLE_SCRIPTS = []
CONSOLE_SCRIPTS.append('dashboard = aup.dashboard.dashboard:main')
def find_version():
# based on https://packaging.python.org/guides/single-sourcing-package-version/
# find version number
import os
import re
file = os.path.join(os.path.abspath(os.path.dirname(__file__)), "src", "aup", "__init__.py")
with open(file, 'r') as fp:
content = fp.read()
match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", content, re.M)
if match:
return match.group(1)
else:
raise RuntimeError("Failed to find version in __init__.py")
setup(
name='Auptimizer',
version=find_version(),
author="LG Electronics Inc.",
author_email="auptimizer@lge.com",
scripts=['src/aup/profiler/profiler.sh', 'src/aup/profiler/statscript.sh'],
license='SPDX-License-Identifier: GPL-3.0-or-later',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url=BASE_URL,
project_urls={
"Bug Tracker": BASE_URL+"/issues",
"Documentation": "https://lge-arc-advancedai.github.io/auptimizer/",
"Source Code": BASE_URL,
},
# install_requires=open("requirements.txt").readlines(),
packages=find_packages("src", exclude=["tests"]),
package_dir={"": "src"},
entry_points={
'console_scripts': CONSOLE_SCRIPTS,
},
zip_safe=False,
include_package_data=True
)