-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
33 lines (26 loc) · 837 Bytes
/
Copy pathsetup.py
File metadata and controls
33 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
32
33
from __future__ import annotations
import sys
from setuptools import Extension, setup
extra_link_args: list[str] = []
extra_compile_args: list[str] = []
libraries: list[str] = []
if sys.platform == "darwin":
extra_link_args.extend(
["-framework", "AudioToolbox", "-framework", "CoreAudio", "-framework", "CoreFoundation"]
)
elif sys.platform.startswith("linux"):
extra_compile_args.append("-pthread")
extra_link_args.extend(["-pthread", "-ldl", "-lm"])
elif sys.platform == "win32":
libraries.extend(["ole32", "uuid", "avrt"])
setup(
ext_modules=[
Extension(
"tachyaudio._native",
sources=["src/tachyaudio/_native.c"],
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args,
libraries=libraries,
)
]
)