From c54e001cd79348385ae537063abddf583f58a309 Mon Sep 17 00:00:00 2001
From: Andrew Conlin <andrew@andrewconl.in>
Date: Wed, 18 Dec 2024 22:14:26 +0000
Subject: [PATCH] [2024-12-18] Add PyO3 features to support Windows
 cross-compilation

---
 Cargo.lock | 27 ++++++++++++++++++++++++++-
 Cargo.toml |  2 +-
 2 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index a3a00a4..247c571 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,6 +1,6 @@
 # This file is automatically @generated by Cargo.
 # It is not intended for manual editing.
-version = 3
+version = 4
 
 [[package]]
 name = "autocfg"
@@ -8,6 +8,15 @@ version = "1.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
 
+[[package]]
+name = "cc"
+version = "1.1.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48"
+dependencies = [
+ "shlex",
+]
+
 [[package]]
 name = "cfg-if"
 version = "1.0.0"
@@ -87,6 +96,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "dc0e0469a84f208e20044b98965e1561028180219e35352a2afaf2b942beff3b"
 dependencies = [
  "once_cell",
+ "python3-dll-a",
  "target-lexicon",
 ]
 
@@ -125,6 +135,15 @@ dependencies = [
  "syn",
 ]
 
+[[package]]
+name = "python3-dll-a"
+version = "0.2.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b9e268ee1be609e93a13eb06839f68f67e5fe0fb4049834d261c2d5091c1b6d"
+dependencies = [
+ "cc",
+]
+
 [[package]]
 name = "quote"
 version = "1.0.37"
@@ -134,6 +153,12 @@ dependencies = [
  "proc-macro2",
 ]
 
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
 [[package]]
 name = "syn"
 version = "2.0.90"
diff --git a/Cargo.toml b/Cargo.toml
index d03a33d..f1bbd93 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,4 +9,4 @@ name = "tictoc"
 crate-type = ["cdylib"]
 
 [dependencies]
-pyo3 = "0.23.3"
+pyo3 = { version = "0.23.3", features = ["extension-module", "generate-import-lib"] }