aboutsummaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2019-01-15 12:14:22 +0000
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2019-01-15 12:14:22 +0000
commit5ba8b8652acd7756216552a38f4a07b049d74d4e (patch)
tree78ffa4c43bf7c2689b13e8028075e0f3e1662dc8 /setup.py
parentChange default coef to 1 so we have inhomogeneous poly kernel (diff)
downloadpygensvm-5ba8b8652acd7756216552a38f4a07b049d74d4e.tar.gz
pygensvm-5ba8b8652acd7756216552a38f4a07b049d74d4e.zip
Move wrapper to better folder structure
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/setup.py b/setup.py
index 1d8a873..c70b81d 100644
--- a/setup.py
+++ b/setup.py
@@ -94,18 +94,14 @@ def configuration():
# Wrapper code in Cython uses the .pyx extension if we want to USE_CYTHON,
# otherwise it ends in .c.
- wrappers = [
- os.path.join('src', 'wrapper.pyx'),
- ]
- if not USE_CYTHON:
- wrappers = [os.path.splitext(w)[0] + '.c' for w in wrappers]
+ wrapper_extension = "*.pyx" if USE_CYTHON else "*.c"
# Sources include the C/Cython code from the wrapper and the source code of
# the C library
- gensvm_sources = wrappers[:]
- gensvm_sources.append([
- os.path.join('src', 'gensvm', 'src', '*.c'),
- ])
+ gensvm_sources = [
+ os.path.join("gensvm", "cython_wrapper", wrapper_extension),
+ os.path.join("src", "gensvm", "src", "*.c"),
+ ]
# Dependencies are the header files of the C library and any potential
# helper code between the library and the Cython code
@@ -115,7 +111,7 @@ def configuration():
]
from numpy import get_include
- config.add_extension('wrapper',
+ config.add_extension('cython_wrapper.wrapper',
sources=gensvm_sources,
libraries=cblas_libs,
include_dirs=[