@@ -5,16 +5,18 @@ Generates import libraries for the Python DLL
55(either ` python3.dll ` or ` python3y.dll ` )
66for MinGW-w64 and MSVC (cross-)compile targets.
77
8- See < https://docs.python.org/3/c-api/stable.html > for the Stable ABI details.
9-
108This crate ** does not require** Python 3 distribution files
119to be present on the (cross-)compile host system.
1210
13- ** Note:** MSVC cross-compile targets require LLVM binutils
14- to be available on the host system.
11+ ** Note:** MSVC cross-compile targets require either LLVM binutils
12+ or Zig to be available on the host system.
1513More specifically, ` python3-dll-a ` requires ` llvm-dlltool ` executable
1614to be present in ` PATH ` when targeting ` *-pc-windows-msvc ` from Linux.
1715
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
18+ of ` llvm-dlltool ` (or MinGW binutils).
19+
1820PyO3 integration
1921----------------
2022
@@ -42,7 +44,7 @@ from the crate build script.
4244
4345The examples below assume using an older version of PyO3.
4446
45- ### Example ` build.rs ` script
47+ ### Example ` build.rs ` script for an ` abi3 ` PyO3 extension
4648
4749The following cargo build script can be used to cross-compile Stable ABI
4850PyO3 extension modules for Windows (64/32-bit x86 or 64-bit ARM)
@@ -73,6 +75,14 @@ pointed by the `PYO3_CROSS_LIB_DIR` environment variable.
7375PYO3_CROSS_LIB_DIR=target/python3-dll cargo build --target x86_64-pc-windows-gnu
7476```
7577
78+ Generating version-specific ` python3y.dll ` import libraries
79+ -----------------------------------------------------------
80+
81+ As an advanced feature, ` python3-dll-a ` can generate Python version
82+ specific import libraries such as ` python39.lib ` .
83+
84+ See the ` ImportLibraryGenerator ` builder API description for details.
85+
7686Maintenance
7787-----------
7888
0 commit comments