-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathsetup.py
More file actions
24 lines (20 loc) · 704 Bytes
/
setup.py
File metadata and controls
24 lines (20 loc) · 704 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
#coding=UTF-8
from setuptools import Extension, setup
import platform, subprocess, numpy
include_dirs = ["include", numpy.get_include()]
library_dirs = []
if platform.system() == "Darwin":
p = subprocess.run(["which", "-s", "brew"])
if p.returncode == 0:
include_dirs.append("/opt/homebrew/include/")
library_dirs.append("/opt/homebrew/lib/")
setup(
ext_modules = [Extension("ccwt",
language = "c",
extra_compile_args = ["-std=c99"],
include_dirs = include_dirs,
library_dirs = library_dirs,
libraries = ["pthread", "fftw3", "fftw3_threads", "png"],
sources = ["src/ccwt.c", "src/render_png.c", "src/python_api.c"]
)]
)