-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
43 lines (41 loc) · 1.17 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
import os, sys
from setuptools import setup
from distutils.core import Extension
try:
import subsets
SUBSETS_ROOT = os.path.dirname(subsets.__file__)
SUBSETS_SO = subsets._subsets.__file__
except ImportError:
print("Error: Package 'subsets' must be instaled before building")
sys.exit(1)
setup(
ext_modules=[
Extension(
"divprop._lib",
include_dirs=[
"./src/",
"./src/sbox/",
"./src/divprop/",
SUBSETS_ROOT,
],
depends=[
"./src/divprop/DivCore.hpp",
"./src/sbox/Sbox.hpp",
"./src/hackycpp.hpp",
],
sources=[
"./src/divprop/lib.i",
"./src/sbox/Sbox.cpp",
],
swig_opts=[
"-c++",
"-DSWIGWORDSIZE64", # https://github.com/swig/swig/issues/568
"-I./src/",
"-I./src/sbox/",
"-I" + SUBSETS_ROOT,
],
extra_compile_args=["-std=c++2a", "-O3", "-fopenmp"],
extra_link_args=["-fopenmp", SUBSETS_SO],
),
]
)