-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
43 lines (33 loc) · 876 Bytes
/
Copy pathsetup.py
File metadata and controls
43 lines (33 loc) · 876 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
32
33
34
35
36
37
38
39
40
41
42
43
"""Setup script for kh57 Cython extensions.
PEP 621 metadata lives in pyproject.toml. This file only declares the
Cython extension modules and drives the build.
"""
import sys
from setuptools import Extension, setup
try:
from Cython.Build import cythonize
except ImportError:
print("Warning: Cython is not installed", file=sys.stderr)
def cythonize(exts: list, **_kwargs: object) -> list: # type: ignore[no-redef]
return exts
extensions = [
Extension(
"kh57.siphash",
["src/kh57/siphash.pyx"],
language="c++",
),
Extension(
"kh57.encoding",
["src/kh57/encoding.pyx"],
language="c++",
),
Extension(
"kh57.sampling",
["src/kh57/sampling.pyx"],
language="c++",
),
]
setup(
ext_modules=cythonize(extensions, language_level=3),
zip_safe=False,
)