forked from sebp/scikit-survival
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
99 lines (80 loc) · 3.5 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
import os
import os.path
import sys
from distutils.command.sdist import sdist
from setuptools import find_packages
with open('README.rst') as fp:
long_description = fp.read()
def configuration(parent_package='', top_path=None):
if os.path.exists('MANIFEST'):
os.remove('MANIFEST')
from numpy.distutils.misc_util import Configuration
config = Configuration(None, parent_package, top_path)
# Avoid non-useful msg:
# "Ignoring attempt to set 'name' (from ... "
config.set_options(ignore_setup_xxx_py=True,
assume_default_configuration=True,
delegate_options_to_subpackages=True,
quiet=True)
config.add_subpackage('sksurv')
return config
def setup_package():
metadata = dict(name='scikit-survival',
url='https://github.com/sebp/scikit-survival',
author='Sebastian Pölsterl',
author_email='[email protected]',
description='Survival analysis built on top of scikit-learn',
long_description=long_description,
license="GPLv3+",
packages=find_packages(),
classifiers=['Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Operating System :: POSIX',
'Operating System :: Unix',
'Programming Language :: C',
'Programming Language :: Python',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Software Development',
'Topic :: Scientific/Engineering',
],
zip_safe=False,
include_package_data=True,
use_scm_version=True,
setup_requires=['setuptools_scm'],
install_requires=[
'cvxpy <1.0',
'numexpr',
'numpy',
'packaging >= 17.2',
'pandas >=0.19, <0.24',
'scipy',
'scikit-learn >=0.19.0, <0.20'],
extras_require={
'full': [
'cvxopt',
'cython'],
'tests': [
'nose',
'coverage'],
'docs': [
'sphinx >= 1.4',
'numpydoc']},
cmdclass={'sdist': sdist},
)
if (len(sys.argv) >= 2
and ('--help' in sys.argv[1:] or sys.argv[1]
in ('--help-commands', 'egg_info', '--version', 'clean'))):
# For these actions, NumPy is not required.
from setuptools import setup
else:
from numpy.distutils.core import setup
metadata['configuration'] = configuration
setup(**metadata)
if __name__ == "__main__":
py_version = sys.version_info[:2]
if py_version < (3, 5):
raise RuntimeError('Python 3.5 or later is required')
setup_package()