From 68ea3081598a0c8dd0e99c5069c63559fdd59f5c Mon Sep 17 00:00:00 2001 From: Grote Date: Thu, 23 Mar 2017 14:06:34 -0700 Subject: Switched high level Python wrapper to ctypes --- Python/setup.py | 41 ++--------------------------------------- 1 file changed, 2 insertions(+), 39 deletions(-) (limited to 'Python/setup.py') 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']}, ) -- cgit v1.2.3