-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
51 lines (44 loc) · 1.18 KB
/
Copy pathsetup.py
File metadata and controls
51 lines (44 loc) · 1.18 KB
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
45
46
47
48
49
50
51
"""Native build configuration for the :mod:`mrshw` package."""
import sys
from pathlib import Path
from setuptools import Extension, setup
ROOT = Path(__file__).parent.resolve()
SOURCES = [
"src/util.c",
"src/hashing.c",
"src/bloomfilter.c",
"src/fingerprint.c",
"src/fingerprintList.c",
"src/helper.c",
"src/traversal.c",
"bindings/glue/mrsh_glue.c",
]
HEADERS = [
str(path.relative_to(ROOT))
for path in sorted((ROOT / "header").glob("*.h"))
] + ["bindings/glue/mrsh_glue.h"]
setup(
ext_modules=[
Extension(
"mrshw.libmrsh",
sources=SOURCES,
depends=HEADERS,
include_dirs=[str(ROOT / "header")],
define_macros=[("_DEFAULT_SOURCE", "1")],
libraries=["m"],
extra_compile_args=[
"-std=c99",
"-Wall",
"-Wextra",
"-Wpedantic",
"-Wmissing-prototypes",
"-fvisibility=hidden",
],
extra_link_args=(
["-Wl,-Bsymbolic-functions"]
if sys.platform.startswith("linux")
else []
),
)
]
)