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:
dkao1978 2017-10-21 20:17:35 -07:00 committed by messense
parent 68937db201
commit eb9050ab90
3 changed files with 14 additions and 3 deletions

View File

@ -57,9 +57,13 @@ fn hello(py: Python) -> PyResult<()> {
Example library with python bindings: Example library with python bindings:
The following two files will build with `cargo build`, and will generate a python-compatible library. 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. On Windows, you will need to rename the output from \*.dll to \*.pyd.
**`Cargo.toml`:** **`Cargo.toml`:**
```toml ```toml

View File

@ -52,7 +52,10 @@ fn hello(py: Python) -> PyResult<()> {
Example library with python bindings: Example library with python bindings:
The following two files will build with `cargo build`, and will generate a python-compatible library. 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. On Windows, you will need to rename the output from \*.dll to \*.pyd.
**`Cargo.toml`:** **`Cargo.toml`:**

View File

@ -121,7 +121,11 @@
//! ```bash //! ```bash
//! cp ./target/debug/libhello.so ./hello.so //! 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: //! The extension module can then be imported into Python:
//! //!