Skip to content

Commit

Permalink
Trying to get macos exe build to work
Browse files Browse the repository at this point in the history
following pyo3 documentation
  • Loading branch information
Vhou-Atroph committed Mar 7, 2024
1 parent d2acba5 commit d328221
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ jobs:
run: |
pip install pyinstaller
cargo build --release
mv ./target/release/tt_damage_calculator.dll tt_damage_calculator.pyd
mv ./target/release/tt_damage_calculator.pyd ./src/tt_damage_calculator
mv ./target/release/libtt_damage_calculator.dylib ./src/tt_damage_calculator/tt_damage_calculator.so
pyinstaller "Toontown Damage Calculator.spec"
cp -R ./src/tt_damage_calculator/assets ./dist/assets
cp -R ./LICENSE ./dist
Expand Down
11 changes: 4 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,16 @@ edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
name = "tt_damage_calculator"
crate-type = ["cdylib"]

[target.x86_64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]

[lib]
name = "tt_damage_calculator"
crate-type = ["cdylib"]

[package.metadata.maturin]
name = "tt_damage_calculator.rustygag"

[dependencies.pyo3]
version = "0.20.2"
features = ["extension-module"]
Expand Down
3 changes: 3 additions & 0 deletions src/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
pyo3_build_config::add_extension_module_link_args();
}

0 comments on commit d328221

Please sign in to comment.