-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathsetup.py
53 lines (41 loc) · 1.61 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
# Copyright (C) 2021-2022 Ajay Arunachalam <[email protected]>
# License: MIT, [email protected]
import pip
import logging
import pkg_resources
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def _parse_requirements(file_path):
pip_ver = pkg_resources.get_distribution('pip').version
pip_version = list(map(int, pip_ver.split('.')[:2]))
if pip_version >= [6, 0]:
raw = pip.req.parse_requirements(file_path,
session=pip.download.PipSession())
else:
raw = pip.req.parse_requirements(file_path)
return [str(i.req) for i in raw]
# parse_requirements() returns generator of pip.req.InstallRequirement objects
try:
install_reqs = _parse_requirements("requirements.txt")
except Exception:
logging.warning('Fail load requirements file, so using default ones.')
install_reqs = []
__version__ = '1.10.0'
def readme():
with open('README.md', 'r', encoding='utf-8') as f:
return f.read()
setup(
name='msda',
version=__version__,
packages=["msda"],
description='MSDA - An open source, low-code time-series multi-sensor data analysis, unsupervised feature selection, deep unsupervised anomaly detection & explainable time-series predictor library in Python.',
long_description = readme(),
long_description_content_type="text/markdown",
url='https://github.com/ajayarunachalam/msda',
install_requires=install_reqs,
license='MIT',
include_package_data=True,
author='Ajay Arunachalam',
author_email='[email protected]')