-
Notifications
You must be signed in to change notification settings - Fork 80
Expand file tree
/
Copy pathsetup.py
More file actions
31 lines (26 loc) · 837 Bytes
/
Copy pathsetup.py
File metadata and controls
31 lines (26 loc) · 837 Bytes
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
from os import environ
from setuptools import setup, Extension # type: ignore[import-untyped]
extra_compile_args = ["-std=c99"]
extra_link_args = []
if environ.get("COVERAGE_BUILD"):
extra_compile_args.extend(["--coverage", "-g", "-O0"])
extra_link_args.extend(["--coverage"])
curvemath = Extension(
"fastecdsa.curvemath",
include_dirs=["src/"],
libraries=["gmp"],
sources=["src/curveMath.c", "src/curve.c", "src/point.c"],
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args,
)
_ecdsa = Extension(
"fastecdsa._ecdsa",
include_dirs=["src/"],
libraries=["gmp"],
sources=["src/_ecdsa.c", "src/curveMath.c", "src/curve.c", "src/point.c"],
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args,
)
setup(
ext_modules=[curvemath, _ecdsa],
)