Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion python/eckitlib/buildconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
# TODO we duplicate information -- pyproject.toml's `name` and `packages` are derivable from $NAME and must stay consistent

NAME="eckit"
CMAKE_PARAMS="-DENABLE_MPI=0 -DENABLE_ECKIT_GEO=1 -DENABLE_BUILD_TOOLS=OFF -DENABLE_AEC=0 -DENABLE_EIGEN=0 -DENABLE_LZ4=1"
if [ "$(uname)" != "Darwin" ] ; then
PROJ_EXTRA="-DPROJ_DIR=/tmp/proj/target/lib64/cmake/proj"
else
PROJ_EXTRA="" # brew install is autodiscovered fine
fi
CMAKE_PARAMS="-DENABLE_MPI=0 -DENABLE_ECKIT_GEO=1 -DENABLE_BUILD_TOOLS=OFF -DENABLE_AEC=0 -DENABLE_EIGEN=0 -DENABLE_LZ4=1 -DENABLE_PROJ=1 $PROJ_EXTRA"
PYPROJECT_DIR="python/eckitlib"
DEPENDENCIES='[]'
27 changes: 23 additions & 4 deletions python/eckitlib/pre-compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,38 @@
set -euo pipefail

mkdir -p python/eckitlib/src/copying
mkdir -p /tmp/eckit/target/eckit/lib64/

if [ "$(uname)" != "Darwin" ] ; then
echo "no deps installation for platform $(uname)"
# echo "no deps installation for platform $(uname)"
prf="lib64"
suf="so"
# echo "installing deps for platform $(uname)"
# NOTE lz4 in the base image already
## lz4
# git clone https://github.com/lz4/lz4 /src/lz4 && cd /src/lz4
# make -j10 && make install DESTDIR=/tmp/lz4
# cd -
echo "installing PROJ platform $(uname)"
# build PROJ -- the DNF install does not seem to work out of the box, ie, cmake doesnt find it
VERSION="9.7.0"
pushd /tmp
wget https://download.osgeo.org/proj/proj-$VERSION.tar.gz
command -v md5sum >/dev/null 2>&1 && echo "MD5 (proj-$VERSION.tar.gz) = b7188aab7a22613a2f5a0bc41c4077b0" | md5sum --check
tar xzf proj-$VERSION.tar.gz
cd proj-$VERSION
mkdir build target && cd build
cmake ..
CMAKE_BUILD_PARALLEL_LEVEL=8 cmake --build .
cmake --install . --prefix /tmp/proj/target
popd

else
echo "no deps installation for platform $(uname)"
prf="lib"
suf="dylib"
fi


wget https://raw.githubusercontent.com/lz4/lz4/dev/LICENSE -O python/eckitlib/src/copying/liblz4.txt
echo '{"liblz4": {"path": "copying/liblz4.txt", "home": "https://github.com/lz4/lz4"}}' > python/eckitlib/src/copying/list.json
wget https://raw.githubusercontent.com/OSGeo/PROJ/refs/heads/master/COPYING -O python/eckitlib/src/copying/proj.txt
echo '{"liblz4": {"path": "copying/liblz4.txt", "home": "https://github.com/lz4/lz4"}, "proj": {"path": "copying/proj.txt", "home": "https://github.com/OSGeo/PROJ"}}' > python/eckitlib/src/copying/list.json

Loading