forked from slinderman/pyhawkes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·40 lines (35 loc) · 1.37 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
#!/usr/bin/env python
import os
import warnings
from distutils.core import setup
from Cython.Build import cythonize
import numpy as np
extra_compile_args = []
extra_link_args = []
# Only compile with OpenMP if user asks for it
USE_OPENMP = os.environ.get('USE_OPENMP', False)
if USE_OPENMP:
extra_compile_args.append('-fopenmp')
extra_link_args.append('-fopenmp')
else:
warnings.warn("Not using OpenMP for parallel parent updates. "
"This will incur a significant performance hit. "
"To compile with OpenMP support, make sure you are "
"using the GNU gcc and g++ compilers and then run "
"'export USE_OPENMP=True' before installing.")
ext_modules = cythonize('**/*.pyx')
for e in ext_modules:
e.extra_compile_args.extend(extra_compile_args)
e.extra_link_args.extend(extra_link_args)
setup(name='pyhawkes',
version='0.3.1',
description='Bayesian inference for network Hawkes processes',
author='Scott Linderman',
author_email='[email protected]',
url='http://www.github.com/slinderman/pyhawkes',
ext_modules=ext_modules,
install_requires=['numpy', 'scipy', 'matplotlib',
'joblib', 'scikit-learn', 'pybasicbayes'],
include_dirs=[np.get_include(),],
packages=['pyhawkes', 'pyhawkes.internals', 'pyhawkes.utils']
)