Fix the pyo3 build for macos. (#324)

* Fix the pyo3 build for macos.

* rustfmt fix.
This commit is contained in:
Laurent Mazare
2023-08-05 14:53:57 +01:00
committed by GitHub
parent 620f83cf66
commit 0b175fcbbd
4 changed files with 15 additions and 2 deletions

View File

@ -1,5 +1,11 @@
From the top level directory run:
From the top level directory run the following for linux.
```
cargo build --release --package candle-pyo3 && cp -f ./target/release/libcandle.so candle.so
cargo build --profile=release-with-debug --package candle-pyo3 && cp -f ./target/release-with-debug/libcandle.so candle.so
PYTHONPATH=. python3 candle-pyo3/test.py
```bash
Or for macOS users:
```bash
cargo build --profile=release-with-debug --package candle-pyo3 && cp -f ./target/release-with-debug/libcandle.dylib candle.so
PYTHONPATH=. python3 candle-pyo3/test.py
```