diff options
author | 2017-02-03 17:18:24 -0800 | |
---|---|---|
committer | 2017-02-03 17:18:24 -0800 | |
commit | 08b37f48ce89aae43b4daa086c1b85d57193fc49 (patch) | |
tree | 7c8dec4adcdfd0fd15541814157f41bd44ba00d5 /Python/setup.py | |
parent | 89b77b8d5da0b00e192aec279b112e26e9e06041 (diff) | |
download | WarpX-08b37f48ce89aae43b4daa086c1b85d57193fc49.tar.gz WarpX-08b37f48ce89aae43b4daa086c1b85d57193fc49.tar.zst WarpX-08b37f48ce89aae43b4daa086c1b85d57193fc49.zip |
Added Python wrapper around top level classes.
Diffstat (limited to 'Python/setup.py')
-rw-r--r-- | Python/setup.py | 15 |
1 files changed, 13 insertions, 2 deletions
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', |