You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guide/src/building_and_distribution.md
+28-19Lines changed: 28 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -17,25 +17,34 @@ You can override the Python interpreter by setting the `PYO3_PYTHON` environment
17
17
18
18
Once the Python interpreter is located, `pyo3-build-config` executes it to query the information in the `sysconfig` module which is needed to configure the rest of the compilation.
19
19
20
-
To validate the configuration which PyO3 will use, you can run the `print-config` binary from the `pyo3-build-config` crate. An example usage of this binary is shown below:
21
-
22
-
```bash
23
-
# (First, clone the PyO3 git repository)
24
-
$ cd path/to/pyo3/repository
25
-
$ cd pyo3-build-config
26
-
$ cargo run --bin print-config
27
-
cargo:rerun-if-env-changed=PYO3_PYTHON
28
-
cargo:rerun-if-env-changed=VIRTUAL_ENV
29
-
cargo:rerun-if-env-changed=CONDA_PREFIX
30
-
cargo:rerun-if-env-changed=PATH
31
-
implementation: CPython
32
-
interpreter version: 3.8
33
-
interpreter path: Some("/usr/bin/python")
34
-
libdir: Some("/usr/lib")
35
-
shared: true
36
-
base prefix: Some("/usr")
37
-
ld_version: Some("3.8")
38
-
pointer width: Some(8)
20
+
To validate the configuration which PyO3 will use, you can run a compilation with the environment variable `PYO3_PRINT_CONFIG=1` set. An example output of doing this is shown below:
21
+
22
+
```console
23
+
$ PYO3_PRINT_CONFIG=1 cargo build
24
+
Compiling pyo3 v0.14.1 (/home/david/dev/pyo3)
25
+
error: failed to run custom build command for `pyo3 v0.14.1 (/home/david/dev/pyo3)`
26
+
27
+
Caused by:
28
+
process didn't exit successfully: `/home/david/dev/pyo3/target/debug/build/pyo3-7a8cf4fe22e959b7/build-script-build` (exit status: 101)
0 commit comments