-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
47 lines (40 loc) · 1.12 KB
/
Copy pathsetup.py
File metadata and controls
47 lines (40 loc) · 1.12 KB
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
43
44
45
46
47
import sys
import os
from setuptools import setup
# Available at setup time due to pyproject.toml
from pybind11.setup_helpers import Pybind11Extension
import distutils.sysconfig
__version__ = "0.0.2"
if (sys.platform[:6] == "darwin"
and (distutils.sysconfig.get_config_var("CC") == "clang"
or os.environ.get("CC", "") == "clang")):
compiler_args = ["-Xpreprocessor"]
linker_args = ["-mlinker-version=305", "-Xpreprocessor"]
else:
compiler_args = []
linker_args = []
compiler_args += ["-fopenmp"]
linker_args += ["-fopenmp"]
ext_modules = [
Pybind11Extension(
"levinpower",
["src/Levin_power.cpp", "python/pybind11_interface.cpp"],
cxx_std=11,
include_dirs=["src"],
libraries=["m", "gsl", "gslcblas"],
extra_compile_args=compiler_args,
extra_link_args=linker_args
),
]
setup(
name="levinpower",
version=__version__,
# author="Robert Reischke",
# author_email="s",
# url="",
# description="",
# long_description="",
ext_modules=ext_modules,
extras_require={"test": "pytest"},
zip_safe=False,
)