From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Build User <buildusr@aix.ibm.com>
Date: Sun, 1 Jun 2026 12:30:34 -0500
Subject: [PATCH] Add AIX platform tag generation with dual format support

Generate both versioned and simplified AIX platform tags to ensure
compatibility with wheels built using either naming convention.

Python's sysconfig.get_platform() returns simplified tags like "aix-ppc64"
while PEP 425 specifies versioned tags like "aix_7_2_ppc64". Packages like
numpy use sysconfig and build wheels with the simplified format. This patch
generates both tag formats so uv can install wheels regardless of which
format was used during the build process.

---
 crates/uv-platform-tags/src/tags.rs | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/crates/uv-platform-tags/src/tags.rs b/crates/uv-platform-tags/src/tags.rs
index 532d5aaed..961eb4984 100644
--- a/crates/uv-platform-tags/src/tags.rs
+++ b/crates/uv-platform-tags/src/tags.rs
@@ -713,6 +713,23 @@ fn compatible_tags(platform: &Platform) -> Result<Vec<PlatformTag>, PlatformErro
                 release_arch: SmallString::from(release_arch),
             }]
         }
+        (Os::Aix { release }, arch) => {
+            let release_tag = release.replace(['.', '-'], "_");
+            let arch_tag = arch.machine();
+            // Generate both full and simplified platform tags
+            // Python's sysconfig returns aix-ppc64 (simplified), but PEP 425 specifies aix_7_2_ppc64 (with version)
+            // We accept both for maximum compatibility
+            let release_arch = format!("{release_tag}_{arch_tag}");
+            let simple_arch = arch_tag.to_string();
+            vec![
+                PlatformTag::Aix {
+                    release_arch: SmallString::from(release_arch),
+                },
+                PlatformTag::Aix {
+                    release_arch: SmallString::from(simple_arch),
+                },
+            ]
+        }
         (Os::Illumos { release, arch }, _) => {
             // See https://github.com/python/cpython/blob/46c8d915715aa2bd4d697482aa051fe974d440e1/Lib/sysconfig.py#L722-L730
             if let Some((major, other)) = release.split_once('_') {
-- 
2.43.0

