forked from owodolab/graspi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
43 lines (35 loc) · 1001 Bytes
/
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
from setuptools import Extension, setup, find_packages
from Cython.Build import cythonize
import numpy
import os
def graspi_paths():
"""Get Graspi paths
"""
return ['cythonizeGraspi', 'src']
def graspi_extension():
"""Configure the graspi extension
"""
return Extension(
name="graspi",
sources=[
os.path.join('cythonizeGraspi', "graspi.pyx"),
os.path.join('src', "graph_constructors.cpp"),
],
include_dirs=[numpy.get_include(), '.'] + graspi_paths(),
extra_compile_args=["-std=c++11"],
language="c++",
optional=True,
)
def setup_args():
"""Get the setup args not availabe from setup.cfg
"""
return dict(
packages=find_packages(),
data_files=["setup.cfg"],
ext_modules=cythonize(
[graspi_extension()],
compiler_directives={"language_level": "3"},
include_path=graspi_paths(),
)
)
setup(**setup_args())