예제 #1
0
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from setuptools import Extension
from astropy_helpers.setup_helpers import get_distutils_option
import numpy as np


def get_package_data():
    return {"tardis.plasma.tests": ["data/*.dat", "data/*.yml"]}


if get_distutils_option("with_openmp", ["build", "install", "develop"]) is not None:
    compile_args = ["-fopenmp", "-W", "-Wall", "-Wmissing-prototypes", "-std=c99"]
    link_args = ["-fopenmp"]
    define_macros = [("WITHOPENMP", None)]
else:
    compile_args = ["-W", "-Wall", "-Wmissing-prototypes", "-std=c99"]
    link_args = []
    define_macros = []


def get_extensions():
    sources = ["tardis/plasma/properties/util/macro_atom.pyx"]
    return [
        Extension(
            "tardis.plasma.properties.util.macro_atom",
            sources,
            include_dirs=[np.get_include()],
            extra_compile_args=compile_args,
            extra_link_args=link_args,
        )
    ]
예제 #2
0
#setting the right include
from setuptools import Extension
import numpy as np
import os
from astropy_helpers.setup_helpers import get_distutils_option
from Cython.Build import cythonize

from glob import glob

if get_distutils_option('with_openmp',
                        ['build', 'install', 'develop']) is not None:
    compile_args = [
        '-fopenmp', '-W', '-Wall', '-Wmissing-prototypes', '-std=c99'
    ]
    link_args = ['-fopenmp']
    define_macros = [('WITHOPENMP', None)]
else:
    compile_args = ['-W', '-Wall', '-Wmissing-prototypes', '-std=c99']
    link_args = []
    define_macros = []

if get_distutils_option('with_vpacket_logging',
                        ['build', 'install', 'develop']) is not None:
    define_macros.append(('WITH_VPACKET_LOGGING', None))


def get_extensions():
    sources = ['tardis/montecarlo/montecarlo.pyx']
    sources += [
        os.path.relpath(fname) for fname in glob(
            os.path.join(os.path.dirname(__file__), 'src', '*.c'))
예제 #3
0
#setting the right include
from setuptools import Extension
import numpy as np
import os
from astropy_helpers.setup_helpers import get_distutils_option
from Cython.Build import cythonize

from glob import glob

if get_distutils_option('with_openmp', ['build', 'install', 'develop']) is not None:
    compile_args = ['-fopenmp', '-W', '-Wall', '-Wmissing-prototypes', '-std=c99']
    link_args = ['-fopenmp']
    define_macros = [('WITHOPENMP', None)]
else:
    compile_args = ['-W', '-Wall', '-Wmissing-prototypes', '-std=c99']
    link_args = []
    define_macros = []

if get_distutils_option('with_vpacket_logging', ['build', 'install', 'develop']) is not None:
    define_macros.append(('WITH_VPACKET_LOGGING', None))

def get_extensions():
    sources = ['tardis/montecarlo/montecarlo.pyx']
    sources += [os.path.relpath(fname) for fname in glob(
        os.path.join(os.path.dirname(__file__), 'src', '*.c'))
                if not os.path.basename(fname).startswith('test')]
    sources += [os.path.relpath(fname) for fname in glob(
        os.path.join(os.path.dirname(__file__), 'src/randomkit', '*.c'))]
    deps = [os.path.relpath(fname) for fname in glob(
        os.path.join(os.path.dirname(__file__), 'src', '*.h'))]
    deps += [os.path.relpath(fname) for fname in glob(