forked from wookayin/gpustat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
67 lines (59 loc) · 1.84 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
from setuptools import setup
import sys
import os
import re
IS_PY_2 = (sys.version_info[0] <= 2)
def read_readme():
with open('README.md') as f:
return f.read()
def read_version():
# importing gpustat causes an ImportError :-)
__PATH__ = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(__PATH__, 'gpustat/__init__.py')) as f:
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
f.read(), re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find __version__ string")
install_requires = [
'six>=1.7',
'nvidia-ml-py>=7.352.0' if IS_PY_2 else \
'nvidia-ml-py3>=7.352.0',
'psutil',
'blessings>=1.6',
]
tests_requires = [
'mock>=2.0.0',
'pytest',
]
setup(
name='gpustat',
version=read_version(),
license='MIT',
description='An utility to monitor NVIDIA GPU status and usage',
long_description=read_readme(),
url='https://github.com/wookayin/gpustat',
author='Jongwook Choi',
author_email='[email protected]',
keywords='nvidia-smi gpu cuda monitoring gpustat',
classifiers=[
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: System :: Monitoring',
],
#packages=['gpustat'],
py_modules=['gpustat'],
install_requires=install_requires,
extras_require={'test': tests_requires},
setup_requires=['pytest-runner'],
tests_require=tests_requires,
entry_points={
'console_scripts': ['gpustat=gpustat:main'],
},
include_package_data=True,
zip_safe=False,
)