forked from automl/auto-sklearn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
87 lines (75 loc) · 3 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
# -*- encoding: utf-8 -*-
import os
import sys
from setuptools import setup, find_packages
from setuptools.extension import Extension
from setuptools.command.build_ext import build_ext
# Check if Auto-sklearn *could* run on the given system
if os.name != 'posix':
raise ValueError(
'Detected unsupported operating system: %s. Please check '
'the compability information of auto-sklearn: http://automl.github.io'
'/auto-sklearn/stable/installation.html#windows-osx-compability' %
sys.platform
)
if sys.version_info < (3, 5):
raise ValueError(
'Unsupported Python version %d.%d.%d found. Auto-sklearn requires Python '
'3.5 or higher.' % (sys.version_info.major, sys.version_info.minor, sys.version_info.micro)
)
class BuildExt(build_ext):
""" build_ext command for use when numpy headers are needed.
SEE tutorial: https://stackoverflow.com/questions/2379898
SEE fix: https://stackoverflow.com/questions/19919905
"""
def finalize_options(self):
build_ext.finalize_options(self)
# Prevent numpy from thinking it is still in its setup process:
# __builtins__.__NUMPY_SETUP__ = False
import numpy
self.include_dirs.append(numpy.get_include())
extensions = [
Extension('autosklearn.data.competition_c_functions',
sources=['autosklearn/data/competition_c_functions.pyx'],
language='c')
]
HERE = os.path.abspath(os.path.dirname(__file__))
setup_reqs = ['Cython', 'numpy']
with open(os.path.join(HERE, 'requirements.txt')) as fp:
install_reqs = [r.rstrip() for r in fp.readlines()
if not r.startswith('#') and not r.startswith('git+')]
with open("autosklearn/__version__.py") as fh:
version = fh.readlines()[-1].split()[-1].strip("\"'")
setup(
name='auto-sklearn',
author='Matthias Feurer',
author_email='[email protected]',
description='Automated machine learning.',
version=version,
cmdclass={'build_ext': BuildExt},
ext_modules=extensions,
packages=find_packages(exclude=['test', 'scripts', 'examples']),
setup_requires=setup_reqs,
install_requires=install_reqs,
test_suite='nose.collector',
include_package_data=True,
license='BSD',
platforms=['Linux'],
classifiers=[
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Information Analysis",
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
python_requires='>=3.5.*',
url='https://automl.github.io/auto-sklearn',
)