-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
42 lines (34 loc) · 1.08 KB
/
setup.py
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
from pathlib import Path
# Available at setup time due to pyproject.toml
from pybind11.setup_helpers import Pybind11Extension, build_ext
from setuptools import setup
_DIR = Path(__file__).parent
_SPEEX_DIR = _DIR / "speex"
__version__ = "1.0.2"
flags = ["-DFLOATING_POINT", "-DUSE_KISS_FFT"]
sources = list(_SPEEX_DIR.glob("*.cc"))
ext_modules = [
Pybind11Extension(
name="speex_noise_cpp",
language="c++",
cxx_std=17,
sources=[str(p) for p in sources] + [str(_DIR / "python.cpp")],
extra_compile_args=flags,
define_macros=[("VERSION_INFO", __version__)],
include_dirs=[str(_SPEEX_DIR)],
),
]
setup(
name="pyspeex_noise",
version=__version__,
author="Michael Hansen",
author_email="[email protected]",
url="https://github.com/rhasspy/pyspeex-noise",
description="Noise suppression and automatic gain with speex",
long_description="",
packages=["pyspeex_noise"],
ext_modules=ext_modules,
zip_safe=False,
python_requires=">=3.7",
classifiers=["License :: OSI Approved :: MIT License"],
)