mirror of
https://github.com/hexedtech/codemp-sublime.git
synced 2024-12-23 13:14:52 +01:00
e387b726c8
Former-commit-id: b08de0a869b6738131e96dd616ef0b96bfb2d975
22 lines
731 B
Bash
Executable file
22 lines
731 B
Bash
Executable file
#!/bin/sh
|
|
|
|
ROOT_DIR="$(pwd)"
|
|
BUILD_DIR="$ROOT_DIR/target/debug/deps"
|
|
FILENAME="libcodemp_client"
|
|
|
|
TARGET_DIR="$ROOT_DIR/bindings"
|
|
TARGET_NAME="codemp_client"
|
|
TARGET_EXT="$(python -c 'import sysconfig; print(sysconfig.get_config_var("EXT_SUFFIX"))')"
|
|
|
|
FULL_TARGET="${TARGET_NAME}${TARGET_EXT}"
|
|
|
|
PYO3_PYTHON="$(pyenv which python)"
|
|
PYTHON_SYS_EXECUTABLE="$PYO3_PYTHON"
|
|
CARGO_FEATURES="pyo3/extension-module"
|
|
|
|
echo "Building with python: $PYO3_PYTHON"
|
|
env PYO3_PYTHON="${PYO3_PYTHON}" PYTHON_SYS_EXECUTABLE="$PYO3_PYTHON" cargo build --features "$CARGO_FEATURES"
|
|
echo "Copying into: $TARGET_DIR/$FULL_TARGET"
|
|
|
|
[[ -f "$TARGET_DIR/$FUll_TARGET" ]] && echo "$FILE exists."
|
|
ditto "$BUILD_DIR/${FILENAME}.dylib" "$TARGET_DIR/$FULL_TARGET"
|