コード例 #1
0
ファイル: setup_package.py プロジェクト: tardis-sn/tardis
#setting the right include
from setuptools import Extension
import os
from astropy_helpers.distutils_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'))]
    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(
コード例 #2
0
def get_package_data():
    return {
        "tardis.plasma.tests": [
            "data/*.dat",
            "data/*.txt",
            "data/*.yml",
            "data/*.h5",
            "data/*.dot",
            "data/*.tex",
        ]
    }


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 = []
コード例 #3
0
#setting the right include
from setuptools import Extension
import os
from astropy_helpers.distutils_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'))
    ]
コード例 #4
0
# setting the right include
from setuptools import Extension
import os
from astropy_helpers.distutils_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"]