aboutsummaryrefslogtreecommitdiff
path: root/Python/setup.py
diff options
context:
space:
mode:
authorGravatar Dave Grote <grote1@llnl.gov> 2017-02-03 17:18:24 -0800
committerGravatar Dave Grote <grote1@llnl.gov> 2017-02-03 17:18:24 -0800
commit08b37f48ce89aae43b4daa086c1b85d57193fc49 (patch)
tree7c8dec4adcdfd0fd15541814157f41bd44ba00d5 /Python/setup.py
parent89b77b8d5da0b00e192aec279b112e26e9e06041 (diff)
downloadWarpX-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.py15
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',