forked from bitcoindevkit/bdk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate-linux.sh
More file actions
32 lines (23 loc) · 962 Bytes
/
generate-linux.sh
File metadata and controls
32 lines (23 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
set -euo pipefail
printf "\nSubmodule check...\n"
git submodule update --init
printf "Submodule is checked out at commit: $(git submodule status)\n\n"
echo "Setting up Python dependencies..."
${PYBIN}/python --version
# Check for uv first (faster), then fall back to pip
if command -v uv &> /dev/null; then
echo "Using uv to install dependencies..."
uv add -r requirements.txt
else
echo "Using pip to install dependencies..."
${PYBIN}/pip install -r requirements.txt || ${PYBIN}/pip3 install -r requirements.txt
fi
cd ./bdk-ffi/bdk-ffi/
echo "Generating native binaries..."
cargo build --profile release-smaller
echo "Generating bdk.py..."
cargo run --bin uniffi-bindgen generate --library ./target/release-smaller/libbdkffi.so --language python --out-dir ../../src/bdkpython/ --no-format
echo "Copying linux libbdkffi.so..."
cp ./target/release-smaller/libbdkffi.so ../../src/bdkpython/libbdkffi.so
echo "All done!"