('dipy.align.bundlemin', [], 'c'), ('dipy.align.transforms', [], 'c'), ('dipy.align.parzenhist', [], 'c'), ('dipy.utils.omp', [], 'c'), ('dipy.utils.fast_numpy', [], 'c')): pyx_src = pjoin(*modulename.split('.')) + '.pyx' EXTS.append( Extension(modulename, [pyx_src] + other_sources, language=language, **deepcopy(ext_kwargs))) # deepcopy lists # Do our own build and install time dependency checking. setup.py gets called # in many different ways, and may be called just to collect information # (egg_info). We need to set up tripwires to raise errors when actually doing # things, like building, rather than unconditionally in the setup.py import or # exec We may make tripwire versions of build_ext, build_py, install need_cython = True pybuilder = get_comrec_build('dipy') # Cython is a dependency for building extensions, iff we don't have stamped # up pyx and c files. build_ext, need_cython = cyproc_exts(EXTS, info.CYTHON_MIN_VERSION, 'pyx-stamps') # Add openmp flags if they work simple_test_c = """int main(int argc, char** argv) { return(0); }""" omp_test_c = """#include <omp.h> int main(int argc, char** argv) { return(0); }""" msc_flag_defines = [ [['/openmp'], [], omp_test_c, 'HAVE_VC_OPENMP'], ] gcc_flag_defines = [ [['-msse2', '-mfpmath=sse'], [], simple_test_c, 'USING_GCC_SSE2'], [['-fopenmp'], ['-fopenmp'], omp_test_c, 'HAVE_OPENMP'],
('dipy.align.transforms', [], 'c'), ('dipy.align.parzenhist', [], 'c')): pyx_src = pjoin(*modulename.split('.')) + '.pyx' EXTS.append(Extension(modulename, [pyx_src] + other_sources, language=language, **deepcopy(ext_kwargs))) # deepcopy lists # Do our own build and install time dependency checking. setup.py gets called in # many different ways, and may be called just to collect information (egg_info). # We need to set up tripwires to raise errors when actually doing things, like # building, rather than unconditionally in the setup.py import or exec # We may make tripwire versions of build_ext, build_py, install need_cython = True pybuilder = get_comrec_build('dipy') # Cython is a dependency for building extensions, iff we don't have stamped # up pyx and c files. build_ext, need_cython = cyproc_exts(EXTS, info.CYTHON_MIN_VERSION, 'pyx-stamps') # Add openmp flags if they work simple_test_c = """int main(int argc, char** argv) { return(0); }""" omp_test_c = """#include <omp.h> int main(int argc, char** argv) { return(0); }""" extbuilder = add_flag_checking( build_ext, [ [['/arch:SSE2'], [], simple_test_c, 'USING_VC_SSE2'], [['-msse2', '-mfpmath=sse'], [], simple_test_c, 'USING_GCC_SSE2'], [['-fopenmp'], ['-fopenmp'], omp_test_c, 'HAVE_OPENMP']], 'dipy')