Skip to content

Commit

Permalink
chore: fix MacOS PyO3 compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
storopoli committed Oct 22, 2024
1 parent ad4707d commit 569f41b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
21 changes: 11 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion crates/util/python-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ bdk_bitcoind_rpc = "0.16.0"
bdk_wallet = "1.0.0-beta.5"
# "abi3-py310" tells pyo3 (and maturin) to build using the stable ABI with minimum Python version 3.10
musig2.workspace = true
pyo3 = { version = "0.22.4", features = ["extension-module", "abi3-py310"] }
pyo3 = { version = "0.22.5", features = ["extension-module", "abi3-py310"] }
reth-primitives.workspace = true

# Internal crates
shrex = { version = "0.1.0", path = "../shrex", features = ["serde"] }

[build-dependencies]
pyo3-build-config = "0.22.5"

[dev-dependencies]
anyhow.workspace = true
bitcoind.workspace = true
Expand Down
6 changes: 6 additions & 0 deletions crates/util/python-utils/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//! Needed for MacOS to link the Python library.
//! See: https://pyo3.rs/v0.14.2/building_and_distribution.html#macos

fn main() {
pyo3_build_config::add_extension_module_link_args();
}

0 comments on commit 569f41b

Please sign in to comment.