-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
44 lines (34 loc) · 1.19 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
#!/usr/bin/env python
"""
setup.py file for SWIG
"""
from setuptools import setup, Extension
import importlib
import subprocess
import sys
def get_include_dirs():
import pkgconfig
import numpy
if not pkgconfig.exists('eigen3'):
raise Exception('Missing `eigen3` library. Please install it using the package manager of your operating system')
np_include_dir = numpy.get_include()
# We have to throw away the `-I` part of the `pkgconfig` output
# because it is not part of the include directory.
eigen3_include_dir = pkgconfig.cflags('eigen3')[2:]
return [np_include_dir, eigen3_include_dir]
GKextCPy_module = Extension('_GKextCPy',
sources = ['GKextCPy_wrap.cxx', 'GKextCPy.cpp'],
swig_opts = ['-c++'],
extra_compile_args = ['-std=c++11', '-O3'],
include_dirs = get_include_dirs()
)
setup(name = 'GKextCPy',
version = '0.4.1',
author = 'Elisabetta Ghisu',
description = """Graph Kernels: building the extension Python module. This is a wrapper package from C++ to Python.""",
ext_modules = [GKextCPy_module],
py_modules = ['GKextCPy'],
setup_requires = ['pkgconfig'],
install_requires = ['numpy'],
license = 'ETH Zurich',
)