setup.py 1.68 KB
Newer Older
1
import setuptools
2
import platform
3
4
from os import walk, path

5
6
7
8
9
10
11
12
13
os_type = platform.system()
if os_type == 'Linux':
    os_name = 'POSIX :: Linux'
elif os_type == 'Darwin':
    os_name = 'MacOS'
else:
    raise NotImplementedError('current platform {} not supported'.format(os_type))

data_files = [('bin', ['node-{}-x64/bin/node'.format(os_type.lower())])]
Gems Guo's avatar
Gems Guo committed
14
for (dirpath, dirnames, filenames) in walk('./nni'):
15
16
17
18
19
20
21
    files = [path.normpath(path.join(dirpath, filename)) for filename in filenames]
    data_files.append((path.normpath(dirpath), files))

with open('../../README.md', 'r') as fh:
    long_description = fh.read()

setuptools.setup(
Gems Guo's avatar
Gems Guo committed
22
    name = 'nni',
Gems Guo's avatar
Gems Guo committed
23
    version = 'NNI_VERSION',
24
25
26
27
28
29
30
    author = 'Microsoft NNI team',
    author_email = 'nni@microsoft.com',
    description = 'Neural Network Intelligence package',
    long_description = long_description,
    long_description_content_type = 'text/markdown',
    license = 'MIT',
    url = 'https://github.com/Microsoft/nni',
Gems Guo's avatar
Gems Guo committed
31
32
33
34
35
36
    packages = setuptools.find_packages('../../tools'),
    package_dir = {
        'nni_annotation': '../../tools/nni_annotation',
        'nni_cmd': '../../tools/nni_cmd',
        'nni_trial_tool':'../../tools/nni_trial_tool'
    },
37
38
    python_requires = '>=3.5',
    install_requires = [
Gems Guo's avatar
Gems Guo committed
39
        'nni-sdk',
Gems Guo's avatar
Gems Guo committed
40
41
42
43
        'schema',
        'pyyaml',
        'psutil',
        'requests',
chicm-ms's avatar
chicm-ms committed
44
45
        'astor',
        'pyhdfs'
46
47
48
49
    ],
    classifiers = [
        'Programming Language :: Python :: 3',
        'License :: OSI Approved :: MIT License',
50
        'Operating System :: ' + os_name
51
52
53
54
    ],
    data_files = data_files,
    entry_points = {
        'console_scripts' : [
Gems Guo's avatar
Gems Guo committed
55
            'nnictl = nni_cmd.nnictl:parse_args'
56
57
58
        ]
    }
)