-
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
- Loading branch information
Showing
5 changed files
with
24 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 6 additions & 7 deletions
13
bindings/nostr-ffi/bindings-python/scripts/generate-linux-x86_64.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
${PYBIN}/python --version | ||
${PYBIN}/pip install -r requirements.txt | ||
|
||
cd ../ | ||
python --version | ||
pip install -r requirements.txt | ||
|
||
echo "Generating native binaries..." | ||
cargo build --release | ||
rustup target add x86_64-unknown-linux-gnu | ||
cargo build --release --target x86_64-unknown-linux-gnu | ||
|
||
echo "Generating nostr.py..." | ||
cargo run -p uniffi-bindgen generate --library ../../target/release/libnostr_ffi.so --language python --no-format -o bindings-python/src/nostr/ | ||
cargo run -p uniffi-bindgen generate --library ../../target/x86_64-unknown-linux-gnu/release/libnostr_ffi.so --language python --no-format -o bindings-python/src/nostr/ | ||
|
||
echo "Copying linux libnostr_ffi.so..." | ||
cp ../../target/release/libnostr_ffi.so bindings-python/src/nostr/ | ||
cp ../../target/x86_64-unknown-linux-gnu/release/libnostr_ffi.so bindings-python/src/nostr/ | ||
|
||
echo "All done!" |
11 changes: 6 additions & 5 deletions
11
bindings/nostr-sdk-ffi/bindings-python/scripts/generate-linux-x86_64.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
${PYBIN}/python --version | ||
${PYBIN}/pip install -r requirements.txt | ||
python --version | ||
pip install -r requirements.txt | ||
|
||
echo "Generating native binaries..." | ||
cargo build --release | ||
rustup target add x86_64-unknown-linux-gnu | ||
cargo build --release --target x86_64-unknown-linux-gnu | ||
|
||
echo "Generating nostr_sdk.py..." | ||
cd ../ | ||
cargo run -p uniffi-bindgen generate --library ../../target/release/libnostr_sdk_ffi.so --language python --no-format -o bindings-python/src/nostr-sdk/ | ||
cargo run -p uniffi-bindgen generate --library ../../target/x86_64-unknown-linux-gnu/release/libnostr_sdk_ffi.so --language python --no-format -o bindings-python/src/nostr-sdk/ | ||
|
||
echo "Copying linux libnostr_sdk_ffi.so..." | ||
cp ../../target/release/libnostr_sdk_ffi.so bindings-python/src/nostr-sdk/ | ||
cp ../../target/x86_64-unknown-linux-gnu/release/libnostr_sdk_ffi.so bindings-python/src/nostr-sdk/ | ||
|
||
echo "All done!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters