-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
74 lines (61 loc) · 2.6 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
# -*- coding: utf-8 -*-
"""
@author: Marcos M. Raimundo
@email: [email protected]
"""
import os
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def read_version():
# Default value if we cannot find the __version__ field in the init file:
version = "0.0.1"
# TODO: Possibly more robust way to find the directory:
# filename = inspect.getframeinfo(inspect.currentframe()).filename
# path = os.path.dirname(os.path.abspath(filename))
init_file = (os.path.dirname(os.path.realpath(__file__)) +
"/actionsenum/__init__.py")
if os.path.exists(init_file):
with open(init_file, 'r') as f:
for line in f:
if line.startswith("__version__"):
_, version = line.split("=")
version = version.replace('\"', '').replace('\'', '')
version = version.strip()
break
return version
params = dict(name="cfmining",
version=read_version(),
author="See contributors on ",
author_email="[email protected]",
maintainer="Marcos Medeiros Raimundo",
maintainer_email="[email protected]",
description="""Algorithm to enumerate Pareto-optimal actions
to regression problems.""",
license="Private.",
keywords="optimization, explainability, actionable",
url="",
long_description=read("README.md"),
package_dir={"": "."},
packages=["cfmining",
],
# package_data = {"": ["README.md", "LICENSE"],
# "examples": ["*.py"],
# "tests": ["*.py"],
# },
classifiers=["Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Machine learning"
"Programming Language :: Python :: 3.7",
],
)
try:
from setuptools import setup
params["install_requires"] = ['actionable-recourse==0.1.1', 'pandas', 'numpy',
'jupyterlab', 'sortedcontainers', 'line_profiler',
'eli5', 'lightgbm', 'mip', 'graphviz',
]
except:
from distutils.core import setup
setup(**params)