-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
64 lines (58 loc) · 1.92 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
# from setuptools import setup
from setuptools import find_packages
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
from Cython.Build import cythonize
import numpy as np
try:
from Cython.Distutils import build_ext
except ImportError:
use_cython = False
else:
use_cython = True
with open("README.md", "r") as fh:
long_description = fh.read()
cmdclass = {}
ext_modules = []
if use_cython:
ext_modules = [
Extension(name="CTL.causal_tree.util_c", sources=["CTL/causal_tree/util_c.pyx"],
include_dirs=[np.get_include(), "."]),
]
cmdclass.update({'build_ext': build_ext})
else:
# ext_modules = [
# Extension(name="CTL.causal_tree.util_c", sources=["CTL/causal_tree/util_c.pyx", "CTL/causal_tree/util_c.c"],
# include_dirs=[np.get_include(), "."]),
# ]
ext_modules = [
Extension(name="CTL.causal_tree.util_c", sources=["CTL/causal_tree/util_c.c"],
include_dirs=[np.get_include(), "."]),
]
setup(
name="causal_tree_learn",
version="2.42",
author="Christopher Tran",
author_email="ctran29@uic.edu",
description="Python implementation of causal trees with validation",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/edgeslab/CTL",
packages=find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
install_requires=['numpy',
'scikit-learn',
'scipy'
],
python_requires='>=3.6',
ext_modules=cythonize(ext_modules),
# cmdclass={'build_ext': build_ext},
cmdclass=cmdclass,
setup_requires=["cython", "numpy"],
package_data={"CTL.causal_tree": ["util_c.c", "util_c.pyx"]}
)