Skip to content

Commit

Permalink
Fix cross-compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller authored Apr 12, 2023
1 parent 37d2da4 commit 65caa17
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ then
test -f "${PREFIX}/bin/pypy" && target_arch=`echo ${target_arch} | sed "s|powerpc64le|ppc_64|g"`
mod_ext=`python -c "import importlib.machinery; print(importlib.machinery.EXTENSION_SUFFIXES[0])" | sed "s|x86_64|${target_arch}|g"`
CROSS_ARGS="-DPYTHON_EXTENSION_MODULE_SUFFIX=${mod_ext}"
if ! test -f "${PREFIX}/bin/pypy"
then
CROSS_ARGS="${CROSS_ARGS} -DPYTHON_EXECUTABLE=${BUILD_PREFIX}/bin/python -DPYTHON_LIBRARY=${BUILD_PREFIX}/lib/libpython${CONDA_PY:0:1}.${CONDA_PY:1}${SHLIB_EXT} -DPYTHON_INCLUDE_DIR=${BUILD_PREFIX}/include/python${CONDA_PY:0:1}.${CONDA_PY:1}"
fi
fi

mkdir build && cd build
cmake ${CMAKE_ARGS} \
cmake -LAH ${CMAKE_ARGS} \
-DCMAKE_PREFIX_PATH=${PREFIX} \
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCMAKE_INSTALL_LIBDIR=lib \
Expand Down

0 comments on commit 65caa17

Please sign in to comment.