-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
38 lines (29 loc) · 831 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
#!/usr/bin/env python3
from distutils.core import setup, Extension
import os
from Cython.Build import cythonize
# TODO: Figure out a way to make `pip install .` work.
# Currently it fails due to the relative path in `extra_objects`.
HFUZZ_PATH = os.getenv('HFUZZ_PATH', '..')
ext_modules = [
Extension(
'hfuzz.native',
['hfuzz/native.pyx'],
extra_objects=[
os.path.join(HFUZZ_PATH, 'libhfuzz/libhfuzz.a'),
os.path.join(HFUZZ_PATH, 'libhfcommon/libhfcommon.a'),
],
include_dirs=[HFUZZ_PATH],
libraries=['rt'],
)
]
setup(
name='hfuzz',
setup_requires=['cython'],
version='0.1',
ext_modules=cythonize(ext_modules, language_level=3, cache=False),
packages=['hfuzz'],
package_dir={
'hfuzz': 'hfuzz',
},
)