diff options
author | 2017-03-23 14:06:34 -0700 | |
---|---|---|
committer | 2017-03-23 14:20:03 -0700 | |
commit | 68ea3081598a0c8dd0e99c5069c63559fdd59f5c (patch) | |
tree | 9364caf91293dd9da260d24d49045338738eacc4 /Python/setup.py | |
parent | 2398659ecc197c69641923e816b3b312d287adf1 (diff) | |
download | WarpX-68ea3081598a0c8dd0e99c5069c63559fdd59f5c.tar.gz WarpX-68ea3081598a0c8dd0e99c5069c63559fdd59f5c.tar.zst WarpX-68ea3081598a0c8dd0e99c5069c63559fdd59f5c.zip |
Switched high level Python wrapper to ctypes
Diffstat (limited to 'Python/setup.py')
-rw-r--r-- | Python/setup.py | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/Python/setup.py b/Python/setup.py index 3c33a6b3a..20e7c5d9f 100644 --- a/Python/setup.py +++ b/Python/setup.py @@ -4,48 +4,11 @@ setup.py file for WarpX """ -import os -from distutils.core import setup, Extension -import platform -import numpy - -try: - numpy_include = numpy.get_include() -except AttributeError: - numpy_include = numpy.get_numpy_include() - -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'] + 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, - ) +from distutils.core import setup setup (name = 'pywarpx', packages = ['pywarpx'], package_dir = {'pywarpx':'pywarpx'}, description = """Wrapper of WarpX""", - ext_modules = [example_module], + package_data = {'pywarpx' : ['libwarpx.so']}, ) |