-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathsetup.py
57 lines (50 loc) · 2.14 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
from setuptools import setup, find_packages
"""
for the long description, convert:
https://coderwall.com/p/qawuyq
or manually here:
http://johnmacfarlane.net/pandoc/try/
"""
def check_java_version():
import re
from subprocess import STDOUT, check_output
out = check_output(["java", "-version"], stderr=STDOUT).split("\n")
if len(out) < 1:
print "failed checking Java version. Make sure Java version 7 or greater is installed."
return False
m = re.match('java version "\d+.(\d+)..*', out[0])
if m is None or len(m.groups()) < 1:
print "failed checking Java version. Make sure Java version 7 or greater is installed."
return False
java_version = int(m.group(1))
if java_version < 7:
error_msg = "Found Java version %d, but Java version 7 or greater is required." % java_version
raise RuntimeError(error_msg)
def check_java_exists():
from subprocess import call
import os
try:
devnull = open(os.devnull, 'w')
call("java", stdout=devnull, stderr=devnull)
except:
error_msg = """
Java not found!
pysmac needs java in order to work. You can download java from:
http://java.com/getjava
"""
raise RuntimeError(error_msg)
check_java_exists()
check_java_version()
setup(
name = "pyfanova",
version = "0.1",
packages = find_packages(),
install_requires = ['numpy', 'docutils>=0.3', 'setuptools', 'matplotlib'],
author = "Tobias Domhan, Aaron Klein (python wrapper). Frank Hutter (FANOVA)",
author_email = "[email protected]",
description = "Functional ANOVA: an implementation of the ICML 2014 paper 'An Efficient Approach for Assessing Hyperparameter Importance' by Frank Hutter, Holger Hoos and Kevin Leyton-Brown.",
include_package_data = True,
keywords = "hyperparameter parameter optimization bayesian smac global variance analysis",
license = "FANOVA is free for academic & non-commercial usage. Please contact Frank Hutter([email protected]) to discuss obtaining a license for commercial purposes.",
url = "http://automl.org/fanova"
)