forked from uber/causalml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
58 lines (51 loc) · 1.72 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
from setuptools import dist, setup, find_packages
from setuptools.extension import Extension
import causalml
try:
from Cython.Build import cythonize
except ImportError:
dist.Distribution().fetch_build_eggs(['cython'])
from Cython.Build import cythonize
try:
from numpy import get_include as np_get_include
except ImportError:
dist.Distribution().fetch_build_eggs(['numpy'])
from numpy import get_include as np_get_include
with open("README.md", "r") as f:
long_description = f.read()
with open("requirements.txt") as f:
requirements = f.readlines()
extensions = [
Extension("causalml.inference.tree.causaltree",
["causalml/inference/tree/causaltree.pyx"],
libraries=[],
include_dirs=[np_get_include()],
extra_compile_args=["-O3"])
]
packages = find_packages()
setup(
name="causalml",
version=causalml.__version__,
author="Huigang Chen, Totte Harinen, Jeong-Yoon Lee, Mike Yung, Zhenyu Zhao",
author_email="",
description="Python Package for Uplift Modeling and Causal Inference with Machine Learning Algorithms",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/uber/causalml",
packages=packages,
python_requires=">=3.6",
classifiers=[
"Programming Language :: Python",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
],
setup_requires=[
# Setuptools 18.0 properly handles Cython extensions.
'setuptools>=18.0',
'cython',
'numpy'
],
install_requires=requirements,
ext_modules=cythonize(extensions),
include_dirs=[np_get_include()]
)