From bf779fd41cdf95e3e4abcf99368fbe7f5e299460 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 17 Nov 2024 08:12:34 +0100 Subject: [PATCH] fix: use build.sh instead of calling cmake --- setup.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/setup.py b/setup.py index c2712da..2afcaa7 100755 --- a/setup.py +++ b/setup.py @@ -157,18 +157,21 @@ class BuildCMakeExt(build_ext): # Now that the necessary directories are created, build + c_compiler=os.environ.get('CC', get_config_var("CC")) + cxx_compiler=os.environ.get('CXX', get_config_var("CXX")) + + os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.14' + install_dir = os.path.abspath(self.build_lib) + self.announce("Configuring cmake project", level=3) - self.spawn(['cmake', '-H'+SOURCE_DIR, '-B'+self.build_temp, - '-DENABLE_OPENMP=ON','-DINTERNAL_BOOST=ON','-DINTERNAL_EIGEN=ON', - '-DINTERNAL_HDF5=ON','-DINTERNAL_GSL=ON', - '-DBUILD_PYTHON_EXTENSION=ON', '-DBUILD_TESTING=OFF', - '-DBUILD_PYTHON_EMBEDDER=OFF', '-DINSTALL_PYTHON_LOCAL=OFF', - '-DINSTALL_COMPATIBILITY_PYBORG=OFF', - '-DCONTEXT_TIMER=ON', '-DBUILD_JULIA=OFF', '-DUSE_NATIVE_ARCH=OFF', - f"-DPYTHON_SITE_PACKAGES={install_dir}", - f"-DPYTHON_EXECUTABLE={sys.executable}"]) - + self.spawn(['bash', 'build.sh', '--build-dir', self.build_temp, + f"--python={sys.executable}", "--c-compiler", c_compiler, + "--cxx-compiler", cxx_compiler, '--purge', + '--skip-building-tests', '--hades-python', '--install-system-python', + '--deprecated', + '--extra-flags', f"-DPYTHON_SITE_PACKAGES={install_dir} -DINSTALL_COMPATIBILITY_PYBORG=OFF -DINSTALL_SHARED=ON -DDATA_INSTALL_DIR={install_dir}/aquila_borg/_data" + ]) self.announce("Building binaries", level=3)