forked from autogluon/autogluon
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
95 lines (85 loc) · 2.59 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
#!/usr/bin/env python
import os
import shutil
import subprocess
from setuptools import setup, find_packages
cwd = os.path.dirname(os.path.abspath(__file__))
version = '0.0.13'
"""
To release a new stable version on PyPi, simply tag the release on github, and the Github CI will automatically publish
a new stable version to PyPi using the configurations in .github/workflows/pypi_release.yml .
You need to increase the version number after stable release, so that the nightly pypi can work properly.
"""
try:
if not os.getenv('RELEASE'):
from datetime import date
today = date.today()
day = today.strftime("b%Y%m%d")
version += day
except Exception:
pass
def create_version_file():
global version, cwd
print('-- Building version ' + version)
version_path = os.path.join(cwd, 'autogluon', 'version.py')
with open(version_path, 'w') as f:
f.write('"""This is autogluon version file."""\n')
f.write("__version__ = '{}'\n".format(version))
long_description = open('README.md').read()
MIN_PYTHON_VERSION = '>=3.6.*'
requirements = [
'Pillow<=6.2.1',
'numpy>=1.16.0',
'scipy>=1.3.3',
'cython',
'tornado>=5.0.1',
'requests',
'matplotlib',
'tqdm>=4.38.0',
'paramiko>=2.4',
'dask>=2.6.0',
'cryptography>=2.8',
'distributed>=2.6.0',
'ConfigSpace<=0.4.10',
'gluoncv>=0.5.0,<1.0',
'graphviz',
'scikit-optimize',
'catboost<0.24',
'boto3',
'lightgbm>=2.3.0,<3.0',
'pandas>=0.24.0,<1.0',
'psutil>=5.0.0,<5.7.2', # TODO: psutil 5.7.2 has error- ImportError: cannot import name '_psutil_linux' from 'psutil'
'scikit-learn>=0.22.0,<0.23',
'networkx>=2.3,<3.0'
]
test_requirements = [
'pytest',
'openml'
]
if __name__ == '__main__':
create_version_file()
setup(
# Metadata
name='autogluon',
version=version,
author='AutoGluon Community',
url='https://github.com/awslabs/autogluon',
description='AutoML Toolkit with MXNet Gluon',
long_description=long_description,
long_description_content_type='text/markdown',
license='Apache',
# Package info
packages=find_packages(exclude=('docs', 'tests', 'scripts')),
zip_safe=True,
include_package_data=True,
install_requires=requirements + test_requirements,
python_requires=MIN_PYTHON_VERSION,
package_data={'autogluon': [
'LICENSE',
]},
entry_points={
'console_scripts': [
'agremote = autogluon.scheduler.remote.cli:main',
]
},
)