Skip to content
Snippets Groups Projects
dev.pyxbld 1.1 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/pocket_fft.c",
simply-nicky's avatar
simply-nicky committed
                                          "pyrost/include/fft_functions.c",
simply-nicky's avatar
simply-nicky committed
                                          "pyrost/include/array.c",
                                          "pyrost/include/routines.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')])