示例#1
0
def test_build_llvm():
    "Test building llvm and getting and using the resulting llvm module"
    tempdir = tempfile.mkdtemp()
    try:
        asmfile = join(tempdir, 'mathcode.s')
        config = build.mkconfig(build.default_config,
                                targets=[build.build_llvm],
                                output_dir=tempdir)
        build.build_targets(config=config)
        assert exists(asmfile)
        get_llvm_lib(asmfile)
    finally:
        shutil.rmtree(tempdir)
示例#2
0
def test_build_llvm():
    "Test building llvm and getting and using the resulting llvm module"
    tempdir = tempfile.mkdtemp()
    try:
        asmfile = join(tempdir, 'mathcode.s')
        config = build.mkconfig(build.default_config,
                                targets=[build.build_llvm],
                                output_dir=tempdir)
        build.build_targets(config=config)
        assert exists(asmfile)
        get_llvm_lib(asmfile)
    finally:
        shutil.rmtree(tempdir)
示例#3
0
文件: setup.py 项目: B-Rich/llvmmath
    run_2to3()

#===------------------------------------------------------------------===
# Generate code for build
#===------------------------------------------------------------------===

if build.have_clang():
    # Build llvm asm
    targets = [build.build_llvm]
else:
    # Only process source files, have distutils build the extension
    logging.info("Working clang not found, building math library with "
                 "default C compiler")
    targets = []

config = build.mkconfig(build.default_config, targets=targets)
llvmmath.build.build_source(config)
try:
    llvmmath.build.build_targets(config)
except subprocess.CalledProcessError as e:
    logging.exception(e)

#===------------------------------------------------------------------===
# setup
#===------------------------------------------------------------------===

setup(
    name="llvmmath",
    version=llvmmath.__version__,
    author="Continuum Analytics, Inc.",
    license="BSD",
示例#4
0
    run_2to3()

#===------------------------------------------------------------------===
# Generate code for build
#===------------------------------------------------------------------===

if build.have_clang():
    # Build llvm asm
    targets = [build.build_llvm]
else:
    # Only process source files, have distutils build the extension
    logging.info("Working clang not found, building math library with "
                 "default C compiler")
    targets = []

config = build.mkconfig(build.default_config, targets=targets)
llvmmath.build.build_source(config)
try:
    llvmmath.build.build_targets(config)
except subprocess.CalledProcessError as e:
    logging.exception(e)

#===------------------------------------------------------------------===
# setup
#===------------------------------------------------------------------===

setup(
    name="llvmmath",
    version=llvmmath.__version__,
    author="Continuum Analytics, Inc.",
    license="BSD",