forked from ABostrom/sktime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
109 lines (97 loc) · 3.66 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#! /usr/bin/env python
"""Install script for sktime"""
from setuptools import find_packages
from setuptools import setup
import codecs
import os
import re
import sys
import platform
try:
import numpy as np
except ModuleNotFoundError as e:
raise ModuleNotFoundError("No module named 'Numpy'. Please install "
"Numpy first using `pip install Numpy`.")
try:
from Cython.Build import cythonize
except ModuleNotFoundError as e:
raise ModuleNotFoundError("No module named 'Cython'. Please install "
"Cython first using `pip install Cython`.")
HERE = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
# intentionally *not* adding an encoding option to open, See:
# https://github.com/pypa/virtualenv/issues/201#issuecomment-3145690
with codecs.open(os.path.join(HERE, *parts), 'r') as fp:
return fp.read()
def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
if version_match:
return version_match.group(1)
else:
raise RuntimeError("Unable to find version string.")
# raise warning for Python versions prior to 3.6
if sys.version_info < (3, 6):
raise RuntimeError("sktime requires Python 3.6 or later. The current"
" Python version is %s installed in %s."
% (platform.python_version(), sys.executable))
DISTNAME = 'sktime'
DESCRIPTION = 'scikit-learn compatible toolbox for learning with time series/panel data'
with codecs.open('README.rst', encoding='utf-8-sig') as f:
LONG_DESCRIPTION = f.read()
MAINTAINER = 'F. Király'
MAINTAINER_EMAIL = '[email protected]'
URL = 'https://github.com/alan-turing-institute/sktime'
LICENSE = 'BSD-3-Clause'
DOWNLOAD_URL = 'https://pypi.org/project/sktime/#files'
PROJECT_URLS = {
'Issue Tracker': 'https://github.com/alan-turing-institute/sktime/issues',
'Documentation': 'https://alan-turing-institute.github.io/sktime/',
'Source Code': 'https://github.com/alan-turing-institute/sktime'
}
VERSION = find_version('sktime', '__init__.py')
INSTALL_REQUIRES = ['numpy', 'scipy', 'scikit-learn', 'pandas', 'scikit-posthocs', 'cython', 'statsmodels']
CLASSIFIERS = ['Intended Audience :: Science/Research',
'Intended Audience :: Developers',
'License :: OSI Approved',
'Programming Language :: Python',
'Topic :: Software Development',
'Topic :: Scientific/Engineering',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Operating System :: Unix',
'Operating System :: MacOS',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7']
EXTRAS_REQUIRE = {
'tests': [
'pytest',
'pytest-cov'],
'docs': [
'sphinx',
'sphinx-gallery',
'sphinx_rtd_theme',
'numpydoc',
'matplotlib'
]
}
setup(name=DISTNAME,
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
description=DESCRIPTION,
license=LICENSE,
url=URL,
version=VERSION,
download_url=DOWNLOAD_URL,
long_description=LONG_DESCRIPTION,
zip_safe=False, # the package can run out of an .egg file
classifiers=CLASSIFIERS,
packages=find_packages(),
include_package_data=True,
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
ext_modules=cythonize(
["sktime/distances/elastic_cython.pyx"],
annotate=True),
include_dirs=[np.get_include()]
)