Skip to content

Commit 9cfe109

Browse files
committed
docs: Update the PyO3 integration examples for v0.16.5
Replace the deprecated `generate-abi3-import-lib` feature with `generate-import-lib`.
1 parent b350bba commit 9cfe109

File tree

2 files changed

+28
-14
lines changed

2 files changed

+28
-14
lines changed

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,33 @@ or Zig to be available on the host system.
1313
More specifically, `python3-dll-a` requires `llvm-dlltool` executable
1414
to be present in `PATH` when targeting `*-pc-windows-msvc` from Linux.
1515

16-
Alternatively, `ZIG_COMMAND` environment variable may be set to e.g. "zig"
17-
or "python -m ziglang", then `zig dlltool` will be used in place
16+
Alternatively, `ZIG_COMMAND` environment variable may be set to e.g. `"zig"`
17+
or `"python -m ziglang"`, then `zig dlltool` will be used in place
1818
of `llvm-dlltool` (or MinGW binutils).
1919

2020
PyO3 integration
2121
----------------
2222

23-
Since version **0.16.4**, the `pyo3` crate implements support
24-
for the Stable ABI Python DLL import library generation via
25-
its new `generate-abi3-import-lib` feature.
23+
Since version **0.16.5**, the `pyo3` crate implements support
24+
for both the Stable ABI and version-specific Python DLL import
25+
library generation via its new `generate-import-lib` feature.
2626

2727
In this configuration, `python3-dll-a` becomes a `pyo3` crate dependency
2828
and is automatically invoked by its build script in both native
2929
and cross compilation scenarios.
3030

31-
### Example `Cargo.toml` usage for a PyO3 extension module
31+
### Example `Cargo.toml` usage for an `abi3` PyO3 extension module
3232

3333
```toml
3434
[dependencies]
35-
pyo3 = { version = "0.16.4", features = ["extension-module", "abi3-py37", "generate-abi3-import-lib"] }
35+
pyo3 = { version = "0.16.5", features = ["extension-module", "abi3-py37", "generate-import-lib"] }
36+
```
37+
38+
### Example `Cargo.toml` usage for a standard PyO3 extension module
39+
40+
```toml
41+
[dependencies]
42+
pyo3 = { version = "0.16.5", features = ["extension-module", "generate-import-lib"] }
3643
```
3744

3845
Standalone build script usage

src/lib.rs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,33 @@
1313
//! More specifically, `python3-dll-a` requires `llvm-dlltool` executable
1414
//! to be present in `PATH` when targeting `*-pc-windows-msvc` from Linux.
1515
//!
16-
//! Alternatively, `ZIG_COMMAND` environment variable may be set to e.g. "zig"
17-
//! or "python -m ziglang", then `zig dlltool` will be used in place
16+
//! Alternatively, `ZIG_COMMAND` environment variable may be set to e.g. `"zig"`
17+
//! or `"python -m ziglang"`, then `zig dlltool` will be used in place
1818
//! of `llvm-dlltool` (or MinGW binutils).
1919
//!
2020
//! PyO3 integration
2121
//! ----------------
2222
//!
23-
//! Since version **0.16.4**, the `pyo3` crate implements support
24-
//! for the Stable ABI Python DLL import library generation via
25-
//! its new `generate-abi3-import-lib` feature.
23+
//! Since version **0.16.5**, the `pyo3` crate implements support
24+
//! for both the Stable ABI and version-specific Python DLL import
25+
//! library generation via its new `generate-import-lib` feature.
2626
//!
2727
//! In this configuration, `python3-dll-a` becomes a `pyo3` crate dependency
2828
//! and is automatically invoked by its build script in both native
2929
//! and cross compilation scenarios.
3030
//!
31-
//! ### Example `Cargo.toml` usage for a PyO3 extension module
31+
//! ### Example `Cargo.toml` usage for an `abi3` PyO3 extension module
3232
//!
3333
//! ```toml
3434
//! [dependencies]
35-
//! pyo3 = { version = "0.16.4", features = ["extension-module", "abi3-py37", "generate-abi3-import-lib"] }
35+
//! pyo3 = { version = "0.16.5", features = ["extension-module", "abi3-py37", "generate-import-lib"] }
36+
//! ```
37+
//!
38+
//! ### Example `Cargo.toml` usage for a standard PyO3 extension module
39+
//!
40+
//! ```toml
41+
//! [dependencies]
42+
//! pyo3 = { version = "0.16.5", features = ["extension-module", "generate-import-lib"] }
3643
//! ```
3744
//!
3845
//! Standalone build script usage

0 commit comments

Comments
 (0)