diff options
author | 2017-03-09 14:24:51 -0800 | |
---|---|---|
committer | 2017-03-09 14:24:51 -0800 | |
commit | 584a32c8dec1647fa194b5c2db79ef5f61f176c6 (patch) | |
tree | eff975966e823e327d37ad350f8ea8384e1e77b6 /Python/setup.py | |
parent | 571a3d30b2794ec18f97d540ca8b14e0fdc537c6 (diff) | |
download | WarpX-584a32c8dec1647fa194b5c2db79ef5f61f176c6.tar.gz WarpX-584a32c8dec1647fa194b5c2db79ef5f61f176c6.tar.zst WarpX-584a32c8dec1647fa194b5c2db79ef5f61f176c6.zip |
Converted python interface to AMReX
Also added python level time step and incomplete wrap to access the fields.
Diffstat (limited to 'Python/setup.py')
-rw-r--r-- | Python/setup.py | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/Python/setup.py b/Python/setup.py index a9d32134d..3c33a6b3a 100644 --- a/Python/setup.py +++ b/Python/setup.py @@ -14,30 +14,33 @@ try: except AttributeError: numpy_include = numpy.get_numpy_include() -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 - -cpp11_flags = ['-std=c++11'] -if platform.system() == "Darwin": - macosx_deployment_target = platform.mac_ver()[0] - os.environ['MACOSX_DEPLOYMENT_TARGET'] = macosx_deployment_target - cpp11_flags.append("-stdlib=libc++") +amrex_home = os.environ.get('AMREX_HOME', '../../amrex') +amrex_includes = ['Src/Base', + 'Src/Particle', + 'Src/Boundary', + 'Src/AmrCore', + 'Tools/scripts'] +amrex_includes = [os.path.join(amrex_home, ii) for ii in amrex_includes] + +include_dirs = [numpy_include, '../Source'] + amrex_includes + +definesstring = os.environ.get('DEFINES','') +defines = definesstring.split(' ') + +#cpp11_flags = [] #['-std=c++11'] +#if platform.system() == "Darwin": +# macosx_deployment_target = platform.mac_ver()[0] +# os.environ['MACOSX_DEPLOYMENT_TARGET'] = macosx_deployment_target +# cpp11_flags.append("-stdlib=libc++") example_module = Extension('pywarpx._warpxC', - swig_opts=['-c++', '-outdir', 'pywarpx'], + swig_opts=['-c++', '-outdir', 'pywarpx'] + defines, 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 = cpp11_flags, + #define_macros = [('BL_USE_MPI','1'), ('BL_SPACEDIM','3'), ('BL_FORT_USE_UNDERSCORE','1'), ('USE_PARTICLES', None)], + #extra_compile_args = cpp11_flags, ) setup (name = 'pywarpx', |