forked from maxiv-science/azint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
31 lines (27 loc) · 841 Bytes
/
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
import sys
from setuptools import setup, find_packages, Extension
from pybind11.setup_helpers import Pybind11Extension
if sys.platform == 'win32':
compile_args = ['/std:c++17', '/openmp']
link_ars = ['/openmp']
else:
compile_args = ['-std=c++17', '-fopenmp']
link_ars = ['-fopenmp']
# See https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk
if sys.platform == 'darwin':
compile_args.append('-D_LIBCPP_DISABLE_AVAILABILITY')
ext_modules = [
Pybind11Extension(
'_azint',
['azint.cpp'],
extra_compile_args=compile_args,
extra_link_args=link_ars
),
]
setup(
name = 'azint',
description = 'Azimthual Integration',
ext_modules = ext_modules,
packages=find_packages(),
package_data={'azint': ['benchmark/bench.poni']},
)