-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
41 lines (35 loc) · 864 Bytes
/
Copy pathsetup.py
File metadata and controls
41 lines (35 loc) · 864 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
34
35
36
37
38
39
40
41
from setuptools import setup
from pybind11.setup_helpers import Pybind11Extension, build_ext
import platform
import os
system = platform.system()
if system == "Darwin":
os.environ["ARCHFLAGS"] = "-arch arm64 -arch x86_64"
compile_args = []
link_args = []
if system == "Windows":
compile_args = ["/O2", "/openmp"]
elif system == "Linux":
compile_args = ["-O3", "-fopenmp"]
link_args = ["-fopenmp"]
else:
compile_args = ["-O3"]
link_args = []
ext_modules = [
Pybind11Extension(
"filters",
["filters.cpp"],
cxx_std=20,
extra_compile_args=compile_args,
extra_link_args=link_args,
),
]
setup(
name="filters",
version="0.1.0",
author="MTT007",
description="Filters, written in C++",
ext_modules=ext_modules,
cmdclass={"build_ext": build_ext},
zip_safe=False,
)