From 65caa1725f97261ea95635b2fe87613240a892a4 Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Wed, 12 Apr 2023 20:08:08 +0200 Subject: [PATCH] Fix cross-compilation --- recipe/build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipe/build.sh b/recipe/build.sh index 610799c..32c53e8 100755 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -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 \