Skip to content

Commit fdb747d

Browse files
committed
set macos link args to fix bin + lib combination
1 parent b4325fd commit fdb747d

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

examples/hello-world-pyprojecttoml/Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/hello-world-pyprojecttoml/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ lto = true
1515
[lib]
1616
# See https://github.com/PyO3/pyo3 for details
1717
name = "_lib" # private module to be nested into Python package
18-
crate-type = ["cdylib"]
18+
crate-type = ["cdylib", "rlib"]
1919
path = "rust/lib.rs"
2020

2121
[[bin]]
2222
name = "print-hello"
2323
path = "rust/print_hello.rs"
24+
25+
[build-dependencies]
26+
pyo3-build-config = "0.19.2"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
graft python
22
graft rust
33
graft tests
4-
include Cargo.toml noxfile.py
4+
include Cargo.toml noxfile.py build.rs
55
global-exclude */__pycache__/*
66
global-exclude *.pyc
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
pyo3_build_config::add_extension_module_link_args();
3+
}

0 commit comments

Comments
 (0)