-
Notifications
You must be signed in to change notification settings - Fork 72
/
Copy pathsetup.py
42 lines (33 loc) · 1005 Bytes
/
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
from distutils.core import setup
from setuptools import find_packages
from subprocess import Popen
from subprocess import PIPE
def has_gpu():
try:
p = Popen(["nvidia-smi"], stdout=PIPE)
stdout, stderror = p.communicate()
return True
except Exception:
return False
with open("README.md", "r") as fh:
long_description = fh.read()
install_requires = ["numpy"]
if has_gpu():
install_requires.append("tensorflow-gpu>=1.6")
else:
install_requires.append("tensorflow>=1.6")
setup(
name="tf_metrics",
version="0.0.1",
author="Guillaume Genthial",
description="Multi-class metrics for Tensorflow",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com",
packages=find_packages(exclude=["test"]),
classifiers=(
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
),
install_requires=install_requires
)