Add documentation for compiling on MacOS (#89)
* Update README.md * Update overview.md * Update lib.rs * Update README.md * Add links
This commit is contained in:
parent
68937db201
commit
eb9050ab90
|
@ -57,9 +57,13 @@ fn hello(py: Python) -> PyResult<()> {
|
|||
Example library with python bindings:
|
||||
|
||||
The following two files will build with `cargo build`, and will generate a python-compatible library.
|
||||
On macOS, you will need to rename the output from \*.dylib to \*.so.
|
||||
For MacOS, "-C link-arg=-undefined -C link-arg=dynamic_lookup" is required to build the library.
|
||||
`setuptools-rust` includes this by default.
|
||||
See [examples/word-count](examples/word-count) and the associated setup.py.
|
||||
Also on macOS, you will need to rename the output from \*.dylib to \*.so.
|
||||
On Windows, you will need to rename the output from \*.dll to \*.pyd.
|
||||
|
||||
|
||||
**`Cargo.toml`:**
|
||||
|
||||
```toml
|
||||
|
|
|
@ -52,7 +52,10 @@ fn hello(py: Python) -> PyResult<()> {
|
|||
Example library with python bindings:
|
||||
|
||||
The following two files will build with `cargo build`, and will generate a python-compatible library.
|
||||
On macOS, you will need to rename the output from \*.dylib to \*.so.
|
||||
For MacOS, "-C link-arg=-undefined -C link-arg=dynamic_lookup" is required to build the library.
|
||||
`setuptools-rust`includes this by default.
|
||||
See [examples/word-count](https://github.com/PyO3/pyo3/tree/master/examples/word-count).
|
||||
Also on macOS, you will need to rename the output from \*.dylib to \*.so.
|
||||
On Windows, you will need to rename the output from \*.dll to \*.pyd.
|
||||
|
||||
**`Cargo.toml`:**
|
||||
|
|
|
@ -121,7 +121,11 @@
|
|||
//! ```bash
|
||||
//! cp ./target/debug/libhello.so ./hello.so
|
||||
//! ```
|
||||
//! (Note: on macOS you will have to rename `libhello.dynlib` to `libhello.so`)
|
||||
//!
|
||||
//! (Note: on macOS you will have to rename `libhello.dynlib` to `libhello.so`.
|
||||
//! To build on macOS, use "-C link-arg=-undefined -C link-arg=dynamic_lookup" is required to build the library.
|
||||
//! `setuptools-rust` includes this by default.
|
||||
//! See [examples/word-count](https://github.com/PyO3/pyo3/tree/master/examples/word-count).)
|
||||
//!
|
||||
//! The extension module can then be imported into Python:
|
||||
//!
|
||||
|
|
Loading…
Reference in New Issue