Fix Python build workflow to account for Linux/Windows
This commit is contained in:
@@ -1 +1,2 @@
|
||||
include ./src/bdkpython/libbdkffi.dylib
|
||||
include ./src/bdkpython/libbdkffi.so
|
||||
|
||||
@@ -13,8 +13,7 @@ pip install bdkpython
|
||||
```shell
|
||||
pip3 install --requirement requirements.txt
|
||||
bash ./generate.sh
|
||||
python3 setup.py --verbose bdist_wheel
|
||||
pip3 install ./dist/bdkpython-<yourversion>-py3-none-any.whl
|
||||
pip3 install ./dist/bdkpython-<yourversion>-py3-none-any.whl --force-reinstall
|
||||
python -m unittest --verbose tests/test_bdk.py
|
||||
```
|
||||
|
||||
|
||||
@@ -1,17 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
OS=$(uname -s)
|
||||
|
||||
echo "Generating bdk.py..."
|
||||
cd ../bdk-ffi/
|
||||
cargo run --features uniffi/cli --bin uniffi-bindgen generate src/bdk.udl --language python --out-dir ../bdk-python/src/bdkpython/ --no-format
|
||||
cargo build --features uniffi/cli --profile release-smaller
|
||||
|
||||
echo "Generating native binaries..."
|
||||
mv ../target/release-smaller/libbdkffi.dylib ../bdk-python/src/bdkpython/libbdkffi.dylib
|
||||
cargo build --features uniffi/cli --profile release-smaller
|
||||
case $OS in
|
||||
"Darwin")
|
||||
echo "Copying macOS libbdkffi.dylib..."
|
||||
cp ../target/release-smaller/libbdkffi.dylib ../bdk-python/src/bdkpython/libbdkffi.dylib
|
||||
;;
|
||||
"Linux")
|
||||
echo "Copying linux libbdkffi.so..."
|
||||
cp ../target/release-smaller/libbdkffi.so ../bdk-python/src/bdkpython/libbdkffi.so
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Bundling bdkpython..."
|
||||
# echo "Bundling bdkpython..."
|
||||
cd ../bdk-python/
|
||||
python3 setup.py --verbose bdist_wheel
|
||||
# python setup.py --verbose bdist_wheel
|
||||
|
||||
echo "All done!"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
semantic-version==2.9.0
|
||||
setuptools-rust==1.1.2
|
||||
typing_extensions==4.0.1
|
||||
setuptools==67.4.0
|
||||
wheel==0.38.4
|
||||
|
||||
Reference in New Issue
Block a user