mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-07 12:16:24 +00:00
Fix wamrapi python binding for darwin (#1978)
This commit is contained in:
parent
91eafa1ead
commit
d8c333f32c
|
@ -1,3 +1,3 @@
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["setuptools>=42"]
|
requires = ["setuptools>=42", "ctypesgen==1.1.1"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -6,7 +6,8 @@
|
||||||
CUR_DIR=$(cd $(dirname $0) && pwd -P)
|
CUR_DIR=$(cd $(dirname $0) && pwd -P)
|
||||||
ROOT_DIR=${CUR_DIR}/../../..
|
ROOT_DIR=${CUR_DIR}/../../..
|
||||||
|
|
||||||
WAMR_BUILD_PLATFORM=${WAMR_BUILD_PLATFORM:-"linux"}
|
UNAME=$(uname -s|tr A-Z a-z)
|
||||||
|
WAMR_BUILD_PLATFORM=${WAMR_BUILD_PLATFORM:-${UNAME}}
|
||||||
|
|
||||||
cd ${ROOT_DIR}/product-mini/platforms/${WAMR_BUILD_PLATFORM}
|
cd ${ROOT_DIR}/product-mini/platforms/${WAMR_BUILD_PLATFORM}
|
||||||
|
|
||||||
|
@ -14,4 +15,18 @@ mkdir -p build && cd build
|
||||||
cmake ..
|
cmake ..
|
||||||
make -j
|
make -j
|
||||||
|
|
||||||
cp libiwasm.so ${CUR_DIR}/../src/wamr/libs
|
case ${UNAME} in
|
||||||
|
darwin)
|
||||||
|
LIBNAME=libiwasm.dylib
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
LIBNAME=libiwasm.so
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
cp ${LIBNAME} ${CUR_DIR}/../src/wamr/libs
|
||||||
|
|
||||||
|
cd ${ROOT_DIR}/language-bindings/python/src/wamr/wamrapi
|
||||||
|
ctypesgen \
|
||||||
|
${ROOT_DIR}/core/iwasm/include/wasm_export.h \
|
||||||
|
-l ../libs/${LIBNAME} \
|
||||||
|
-o iwasm.py
|
||||||
|
|
Loading…
Reference in New Issue
Block a user