Skip to content

Commit c3a6098

Browse files
committed
docs: Add Python ABI flags parameter documentation
1 parent ca1b1e8 commit c3a6098

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ Generating version-specific `python3y.dll` import libraries
9595
-----------------------------------------------------------
9696

9797
As an advanced feature, `python3-dll-a` can generate Python version
98-
specific import libraries such as `python39.lib`.
98+
specific import libraries such as `python39.lib` or `python313t.lib`.
9999

100100
See the `ImportLibraryGenerator` builder API description for details.
101101

102102
Maintenance
103103
-----------
104104

105-
This crate embeds Module-Defitions based on the `stable_abi.toml` file from CPython.
105+
This crate embeds Module-Definitions based on the `stable_abi.toml` file from CPython.
106106

107107
The upstream version of this file is located in the [CPython project][cpython]
108108
repository under the path `Misc/stable_abi.toml`.

src/lib.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
//! -----------------------------------------------------------
9292
//!
9393
//! As an advanced feature, `python3-dll-a` can generate Python version
94-
//! specific import libraries such as `python39.lib`.
94+
//! specific import libraries such as `python39.lib` or `python313t.lib`.
9595
//!
9696
//! See the [`ImportLibraryGenerator`] builder API description for details.
9797
@@ -137,6 +137,9 @@ pub enum PythonImplementation {
137137
/// Generates `python3.dll` or `pythonXY.dll` import library directly from the
138138
/// embedded Python ABI definitions data for the specified compile target.
139139
///
140+
/// ABI-tagged versioned Python DLLs such as `python313t.dll` are also supported
141+
/// via an optional ABI flags string parameter.
142+
///
140143
/// Example usage
141144
/// -------------
142145
///
@@ -164,6 +167,13 @@ pub enum PythonImplementation {
164167
/// .version(Some((3, 8)))
165168
/// .generate(Path::new("target/python3-lib"))
166169
/// .unwrap();
170+
///
171+
/// // Generate `python313t.lib` in "target/python3-lib"
172+
/// ImportLibraryGenerator::new("x86_64", "msvc")
173+
/// .version(Some((3, 13)))
174+
/// .abiflags(Some("t"))
175+
/// .generate(Path::new("target/python3-lib"))
176+
/// .unwrap();
167177
/// ```
168178
#[derive(Debug, Clone)]
169179
pub struct ImportLibraryGenerator {

0 commit comments

Comments
 (0)