Skip to content

Commit

Permalink
Merge pull request #1550 from ravenexp/arch-env-vars
Browse files Browse the repository at this point in the history
Update `build.rs` env vars in Architecture.md
  • Loading branch information
davidhewitt authored Apr 11, 2021
2 parents 7ac7536 + 68d187a commit f4456ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,12 @@ PyO3's [`build.rs`](https://github.com/PyO3/pyo3/tree/master/build.rs) is relati
Below is a non-exhaustive list of its functionality:
- Cross-compiling support.
- If `TARGET` architecture and `HOST` architecture differ, we find cross compile information
from environment variables (`PYO3_CROSS_INCLUDE_DIR` and `PYO3_CROSS_PYTHON`) or system files.
from environment variables (`PYO3_CROSS_LIB_DIR` and `PYO3_CROSS_PYTHON_VERSION`) or system files.
- Find the interpreter for build and detect the Python version.
- We have to set some version flags like `Py_37`.
- If the interpreter is PyPy, we set `PyPy`.
- If `PYO3_NO_PYTHON` environment variable is set then the interpreter detection is bypassed
entirely and only abi3 extensions can be built.
- Check if we are building a Python extension.
- If we are building an extension (e.g., Python library installable by `pip`),
we don't link `libpython`.
Expand Down

0 comments on commit f4456ae

Please sign in to comment.