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 54 55 56 57 58 59 60 61 62 63 64 65 66
|
fs = import('fs')
__init__py = fs.copyfile('__init__.py')
#### pyx -> c generator, depending on copied pxd files and init
loess_cython_gen = generator(
cython,
arguments: cython_args,
output: '_@BASENAME@.c',
depends: [
__init__py,
fs.copyfile('src/c_loess.pxd'),
fs.copyfile('src/loess.h')
]
)
###
#### Fortran Loess into a static library
floess_sources = [
'src/loessf.f',
'src/linpack_lite.f'
]
floess_lib = static_library(
'floess',
floess_sources,
fortran_args: [fortran_ignore_warnings],
dependencies: [blas, lapack]
)
###
#### Loess Extenstion Module
py.extension_module(
'_loess',
sources: [
'src/loess.c',
'src/loessc.c',
'src/misc.c',
'src/predict.c',
loess_cython_gen.process('src/_loess.pyx')
],
c_args: [cython_c_args, numpy_nodepr_api],
dependencies: [py_dep, npymath_lib, np_dep],
link_with: [floess_lib],
link_args: [cython_c_link_args],
link_language: 'c',
install: true,
subdir: 'skmisc/loess'
)
###
#### Include Python Sources in this Directory
# Copy the subpackage __init__ to the build dir
python_sources = [
'__init__.py'
]
py.install_sources(
python_sources,
subdir: 'skmisc/loess'
)
###
#### Included sub-packages
subdir('tests')
###
|