forked from acumos/vm-predictor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
70 lines (62 loc) · 2.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
60
61
62
63
64
65
66
67
68
69
70
# -*- coding: utf-8 -*-
# ===============LICENSE_START=======================================================
# Acumos Apache-2.0
# ===================================================================================
# Copyright (C) 2017-2018 AT&T Intellectual Property & Tech Mahindra. All rights reserved.
# ===================================================================================
# This Acumos software file is distributed by AT&T and Tech Mahindra
# under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ===============LICENSE_END=========================================================
import os
from setuptools import setup, find_packages
from setuptools.command.install import install
# extract __version__ from version file. importing will lead to install failures
setup_dir = os.path.dirname(__file__)
with open(os.path.join(setup_dir, 'vm_predictor', '_version.py')) as file:
globals_dict = dict()
exec(file.read(), globals_dict)
__version__ = globals_dict['__version__']
__model_name__ = globals_dict['__model_name__']
# warning (if run in verbose mode) about installing this object
class new_install(install):
def run(self):
with open(os.path.join(setup_dir, __model_name__, "INSTALL.txt")) as f:
print(f.read())
install.run(self)
# read requirements list from supplementary file in this repo
# requirement_list = [line for line in open(os.path.join(setup_dir, 'requirements.txt')) if line and line[0] != '#']
setup(
name=__model_name__,
version=__version__,
packages=find_packages(), # NOTE - THIS SHOULD NOT BE AN INSTALLED PACKAGE!
author="Michael Tinnemeier",
author_email="[email protected]",
description=("VM resource predictor based on historical data and context"),
long_description=("VM resource predictor based on historical data and context"),
license="Apache",
package_data={__model_name__: ['requirements.txt', 'INSTALL.txt']},
# setup_requires=['pytest-runner'],
entry_points="""
[console_scripts]
""",
# setup_requires=['pytest-runner'],
install_requires=[
"acumos",
"numpy",
"sklearn",
"pandas",
"matplotlib"
],
tests_require=[],
cmdclass={'install': new_install},
include_package_data=True,
)