mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-13 05:52:38 +02:00
rrename build.py to build_extension due to issues on mac devices
This commit is contained in:
parent
e63e1de2f9
commit
23d9b5a830
1 changed files with 0 additions and 0 deletions
62
build_extension.py
Normal file
62
build_extension.py
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
import sys
|
||||
import numpy as np
|
||||
from setuptools import setup, Extension
|
||||
|
||||
|
||||
def ismac():
|
||||
return sys.platform[:6] == "darwin"
|
||||
|
||||
if ismac():
|
||||
compile_flags = ["-O3"]
|
||||
link_args = []
|
||||
else:
|
||||
compile_flags = ["-fopenmp", "-O3"]
|
||||
link_args = ["-lgomp"]
|
||||
|
||||
extensions = [
|
||||
Extension(
|
||||
name="GPy.kern.src.stationary_cython",
|
||||
sources=[
|
||||
"GPy/kern/src/stationary_cython.pyx",
|
||||
"GPy/kern/src/stationary_utils.c",
|
||||
],
|
||||
include_dirs=[np.get_include(), "."],
|
||||
extra_compile_args=compile_flags,
|
||||
extra_link_args=link_args,
|
||||
),
|
||||
Extension(
|
||||
name="GPy.util.choleskies_cython",
|
||||
sources=["GPy/util/choleskies_cython.pyx"],
|
||||
include_dirs=[np.get_include(), "."],
|
||||
extra_link_args=link_args,
|
||||
extra_compile_args=compile_flags,
|
||||
),
|
||||
Extension(
|
||||
name="GPy.util.linalg_cython",
|
||||
sources=["GPy/util/linalg_cython.pyx"],
|
||||
include_dirs=[np.get_include(), "."],
|
||||
extra_compile_args=compile_flags,
|
||||
extra_link_args=link_args,
|
||||
),
|
||||
Extension(
|
||||
name="GPy.kern.src.coregionalize_cython",
|
||||
sources=["GPy/kern/src/coregionalize_cython.pyx"],
|
||||
include_dirs=[np.get_include(), "."],
|
||||
extra_compile_args=compile_flags,
|
||||
extra_link_args=link_args,
|
||||
),
|
||||
Extension(
|
||||
name="GPy.models.state_space_cython",
|
||||
sources=["GPy/models/state_space_cython.pyx"],
|
||||
include_dirs=[np.get_include(), "."],
|
||||
extra_compile_args=compile_flags,
|
||||
extra_link_args=link_args,
|
||||
),
|
||||
]
|
||||
|
||||
def build(setup_kwargs):
|
||||
"""Needed for the poetry building interface."""
|
||||
setup_kwargs.update({
|
||||
'ext_modules': extensions,
|
||||
# 'include_dirs': [np.get_include()],
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue