-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsetup.py
More file actions
36 lines (32 loc) · 1.21 KB
/
Copy pathsetup.py
File metadata and controls
36 lines (32 loc) · 1.21 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
"""
setup.py — minimal companion to pyproject.toml so the setuptools build
backend compiles the Cython kernel into the wheel.
All package metadata lives in ``pyproject.toml`` under ``[project]`` (PEP
621). This file exists solely to declare the Cython extension; without
it, setuptools doesn't know there's a ``.pyx`` to compile.
End users `pip install aaanalysis` (or `uv add aaanalysis`) get the
precompiled `.so` inside the wheel — no manual build step. See
docs/adr/0001-cpp-backend-architecture.md.
"""
import numpy as np
from Cython.Build import cythonize
from setuptools import setup
setup(
ext_modules=cythonize(
[
"aaanalysis/feature_engineering/_backend/cpp/_filters_c/_inner.pyx",
],
language_level=3,
compiler_directives={
# Match the directives in _inner.pyx (boundscheck=False,
# wraparound=False, cdivision=True, initializedcheck=False).
# Re-stated here so they're applied even if a future contributor
# removes the header line.
"boundscheck": False,
"wraparound": False,
"cdivision": True,
"initializedcheck": False,
},
),
include_dirs=[np.get_include()],
)