Skip to content
Snippets Groups Projects
dev.pyxbld 1.11 KiB
Newer Older
Nikolay Ivanov's avatar
Nikolay Ivanov committed
def make_ext(modname, pyxfilename):
    from distutils.core import Extension
Nikolay Ivanov's avatar
Nikolay Ivanov committed
    import numpy
    from Cython.Build import cythonize
    import os
    import sys
    import Cython.Compiler.Options
    Cython.Compiler.Options.annotate = True
    return Extension(name='dev', sources=["dev.pyx", "pyrost/include/st_gaussian.c",
                                          "pyrost/include/st_utils.c",
                                          "pyrost/include/st_waveprop_fftw.c",
                                          "pyrost/include/st_waveprop_np.c",], language="c",
simply-nicky's avatar
simply-nicky committed
                     extra_compile_args=['-fopenmp', '-std=c99'],
Nikolay Ivanov's avatar
Nikolay Ivanov committed
                     extra_link_args=['-lgomp'],
                     libraries=['gsl', 'gslcblas', 'fftw3', 'fftw3_omp'],
Nikolay Ivanov's avatar
Nikolay Ivanov committed
                     library_dirs=[os.path.join(sys.prefix, 'lib'),
                                   '/usr/local/lib'],
                     include_dirs=[numpy.get_include(),
                                   os.path.join(sys.prefix, 'include'),
                                   os.path.join(os.path.dirname(__file__),
                                   'pyrost/include')])