Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Added Ninja to the linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
MintoDA1 authored and MintoDA1 committed Sep 21, 2023
1 parent 00a4985 commit 58b7997
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
19 changes: 19 additions & 0 deletions buildscripts/build_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,25 @@ ARGS=$@
NPROC=$(nproc)

cd $ROOT_DIR
NINJA_VER="1.11.1"

printf "*********************************************************\n"
printf "* FETCHING NINJA SOURCE *\n"
printf "*********************************************************\n"
printf "Copying files to ${DEPENDENCY_DIR}\n"
mkdir -p ${DEPENDENCY_DIR}
if [ ! -d ${DEPENDENCY_DIR}/ninja-${NINJA_VER} ]; then
[ -d ${DEPENDENCY_DIR}/zlib-* ] && rm -rf ${DEPENDENCY_DIR}/zlib-*
curl -L https://github.com/ninja-build/ninja/archive/refs/tags/v${NINJA_VER}.tar.gz | tar xvz -C ${DEPENDENCY_DIR}
fi
cd ${DEPENDENCY_DIR}/ninja-*
cmake -B build -S . -DCMAKE_INSTALL_PREFIX=${PREFIX}
cmake --build build
if [ -w ${PREFIX} ]; then
cmake --install build
else
sudo cmake --install build
fi

set -e
${SCRIPT_DIR}/build_zlib.sh ${ARGS}
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,14 @@ netCDF-Fortran_DIR="${PREFIX}/lib/cmake/netCDF"
[tool.cibuildwheel.macos]
before-all = [
"brew install coreutils",
"LIBS=\"\" buildscripts/build_dependencies.sh -p ${PREFIX} -d ${PREFIX}/build -m ${MACOSX_DEPLOYMENT_TARGET}"
"LIBS=\"\" buildscripts/build_dependencies.sh -p ${TMPDIR}/build -d ${HOME}/Downloads -m ${MACOSX_DEPLOYMENT_TARGET}"
]

[tool.cibuildwheel.linux]
before-all = [
"yum install doxygen libxml2-devel libcurl-devel -y",
"wget https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip",
"unzip ninja-linux.zip -d /usr/local/bin",
"buildscripts/build_dependencies.sh -p /usr/local"
]
[tool.cibuildwheel.linux.environment]
Expand Down

0 comments on commit 58b7997

Please sign in to comment.