-
Notifications
You must be signed in to change notification settings - Fork 18
/
setup.py
53 lines (50 loc) · 1.55 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# SPDX-License-Identifier: MPL-2.0
# Copyright (C) 2020- The University of Tokyo
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from Cython.Build import cythonize
from Cython.Distutils import build_ext
from setuptools import setup, Extension
import numpy
compile_flags = [
"-O3",
]
ext_mods = [
Extension(
name="physbo.misc._src.traceAB",
sources=["physbo/misc/_src/traceAB.pyx"],
include_dirs=[numpy.get_include()],
extra_compile_args=compile_flags,
),
Extension(
name="physbo.misc._src.cholupdate",
sources=["physbo/misc/_src/cholupdate.pyx"],
include_dirs=[numpy.get_include()],
extra_compile_args=compile_flags,
),
Extension(
name="physbo.misc._src.diagAB",
sources=["physbo/misc/_src/diagAB.pyx"],
include_dirs=[numpy.get_include()],
extra_compile_args=compile_flags,
),
Extension(
name="physbo.gp.cov._src.enhance_gauss",
sources=["physbo/gp/cov/_src/enhance_gauss.pyx"],
include_dirs=[numpy.get_include()],
extra_compile_args=compile_flags,
),
Extension(
name="physbo.misc._src.logsumexp",
sources=["physbo/misc/_src/logsumexp.pyx"],
include_dirs=[numpy.get_include()],
extra_compile_args=compile_flags,
),
]
setup(
package_dir={"physbo": "physbo"},
cmdclass={"build_ext": build_ext},
ext_modules=ext_mods,
)