Spaces:
Sleeping
Sleeping
| from __future__ import annotations | |
| from setuptools import Extension, setup | |
| def build_extensions() -> list[Extension]: | |
| try: | |
| from Cython.Build import cythonize | |
| import numpy | |
| except Exception: | |
| return [] | |
| extensions = [ | |
| Extension( | |
| "bat_tracker._fast_merge", | |
| ["bat_tracker/_fast_merge.pyx"], | |
| include_dirs=[numpy.get_include()], | |
| ), | |
| Extension( | |
| "bat_tracker._fast_tracker", | |
| ["bat_tracker/_fast_tracker.pyx"], | |
| include_dirs=[numpy.get_include()], | |
| ) | |
| ] | |
| return cythonize(extensions, language_level="3") | |
| setup(ext_modules=build_extensions()) | |