diff --git a/buildscripts/build_shtools.sh b/buildscripts/build_shtools.sh index a7aa6b76c..eb37d2a8c 100755 --- a/buildscripts/build_shtools.sh +++ b/buildscripts/build_shtools.sh @@ -15,18 +15,6 @@ ARGS=$@ . ${SCRIPT_DIR}/_build_getopts.sh ${ARGS} . ${SCRIPT_DIR}/set_compilers.sh -SHTOOLS_VER="4.10.4" - -printf "*********************************************************\n" -printf "* FETCHING SHTOOLS SOURCE *\n" -printf "*********************************************************\n" -printf "Copying files to ${DEPENDENCY_DIR}\n" -mkdir -p ${DEPENDENCY_DIR} -if [ ! -d ${DEPENDENCY_DIR}/SHTOOLS-${SHTOOLS_VER} ]; then - [ -d ${DEPENDENCY_DIR}/SHTOOLS-* ] && rm -rf ${DEPENDENCY_DIR}/SHTOOLS-* - curl -L https://github.com/SHTOOLS/SHTOOLS/releases/download/v${SHTOOLS_VER}/SHTOOLS-${SHTOOLS_VER}.tar.gz | tar xvz -C ${DEPENDENCY_DIR} -fi - printf "*********************************************************\n" printf "* BUILDING SHTOOLS LIBRARY *\n" printf "*********************************************************\n" @@ -38,13 +26,15 @@ printf "LD_LIBRARY_PATH: ${LD_LIBRARY_PATH}\n" printf "LDFLAGS: ${LDFLAGS}\n" printf "*********************************************************\n" -cd ${DEPENDENCY_DIR}/SHTOOLS-* +cd SHTOOLS +make F95="${FC}" CXX="${CXX}" fortran make F95="${FC}" CXX="${CXX}" fortran-mp if [ -w ${PREFIX} ]; then make PREFIX="${PREFIX}" install else sudo make PREFIX="${PREFIX}" install fi +cd .. if [ $? -ne 0 ]; then printf "SHTOOLS could not be compiled.\n" diff --git a/buildscripts/install_editable_debug.sh b/buildscripts/install_editable_debug.sh index 10e5eb850..fb600a58a 100755 --- a/buildscripts/install_editable_debug.sh +++ b/buildscripts/install_editable_debug.sh @@ -5,8 +5,17 @@ SCRIPT_DIR=$(realpath $(dirname $0)) ROOT_DIR=$(realpath ${SCRIPT_DIR}/..) VENV_DIR=${ROOT_DIR}/venv cd ${ROOT_DIR} -python3 -m venv ${VENV_DIR} -. ${VENV_DIR}/bin/activate + +# Create the virtual environment if it doesn't exist +if [ ! -d "${VENV_DIR}" ]; then + python3 -m venv ${VENV_DIR} +fi + +# Activate the virtual environment only if it's not already active +if [ -z "${VIRTUAL_ENV}" ]; then + . ${VENV_DIR}/bin/activate +fi + python3 -m pip install --upgrade pip pip install scikit-build-core pyproject-metadata pathspec ninja cython cmake ffmpeg-python pip install --config-settings=editable.rebuild=true \ diff --git a/pyproject.toml b/pyproject.toml index ca161ee50..c7b1f6201 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers=[ ] keywords=['astronomy','astrophysics', 'planetary', 'n-body', 'integrator', 'symplectic', 'wisdom-holman', 'symba'] dependencies = [ - 'numpy>=1.24.3', + 'numpy>=1.26.3', 'scipy>=1.10.1', 'xarray>=2023.1', 'dask>=2023.5', @@ -36,9 +36,11 @@ dependencies = [ 'matplotlib>=3.7', 'astropy>=5.2', 'astroquery>=0.4.6', - 'tqdm>=4.64.1', - 'cython>=3.0.0', - 'pyshtools==4.10.4' + 'tqdm>=4.64', + 'cython>=3.0', + 'meson>=1.3', + 'meson-python>=0.15', + 'pyshtools==4.11.10' ] [project.urls] @@ -61,6 +63,7 @@ requires = [ "sphinxext-rediraffe", "sphinxext-opengraph", "nbsphinx", + 'meson-python>=0.15', "ford" ] build-backend = "scikit_build_core.build" @@ -112,7 +115,7 @@ netCDF-Fortran_DIR="${PREFIX}/lib/cmake/netCDF" [tool.cibuildwheel.macos] before-all = [ - "brew install coreutils", + "brew install coreutils pkg-config fftw vecLibFort", "LIBS=\"\" buildscripts/build_dependencies.sh -p ${PREFIX} -d ${HOME}/Downloads -m ${MACOSX_DEPLOYMENT_TARGET}" ]