From 08b37f48ce89aae43b4daa086c1b85d57193fc49 Mon Sep 17 00:00:00 2001 From: Dave Grote Date: Fri, 3 Feb 2017 17:18:24 -0800 Subject: Added Python wrapper around top level classes. --- Python/setup.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'Python/setup.py') diff --git a/Python/setup.py b/Python/setup.py index c1d2855a4..58f77b8da 100644 --- a/Python/setup.py +++ b/Python/setup.py @@ -4,6 +4,7 @@ setup.py file for WarpX """ +import os from distutils.core import setup, Extension import numpy @@ -13,14 +14,24 @@ try: except AttributeError: numpy_include = numpy.get_numpy_include() -include_dirs = [numpy_include, '../Source'] +boxlib_home = os.environ.get('BOXLIB_HOME', '../../BoxLib') +boxlib_includes = ['Src/C_BaseLib', + 'Src/C_ParticleLib', + 'Src/C_BoundaryLib', + 'Src/C_AmrCoreLib', + 'Tools/C_scripts'] +boxlib_includes = [os.path.join(boxlib_home, ii) for ii in boxlib_includes] + +include_dirs = [numpy_include, '../Source'] + boxlib_includes example_module = Extension('pywarpx._warpxC', - swig_opts=['-c++', '-outdir','pywarpx'], + swig_opts=['-c++', '-outdir', 'pywarpx'], sources=['warpxC.i'], library_dirs=['.'], libraries=['warpx'], include_dirs = include_dirs, + define_macros = [('BL_USE_MPI','1'), ('BL_SPACEDIM','3'), ('BL_FORT_USE_UNDERSCORE','1'), ('USE_PARTICLES', None)], + extra_compile_args = ['-std=c++11'], ) setup (name = 'pywarpx', -- cgit v1.2.3