Python: add py3-headers target to support compiled python modules

headers only as when using python binary with static libpython like py3-cmd and py3-launcher-* do python does not need to link to library

Bug: 388815541
Change-Id: Icb9f4bacada1448f64ca806964d38122d67e5099
diff --git a/Android.bp b/Android.bp
index 00ab56e..9788fac 100644
--- a/Android.bp
+++ b/Android.bp
@@ -523,6 +523,35 @@
     ],
 }
 
+cc_library_headers {
+    name: "py3-headers",
+    defaults: [
+        "py3-interp-defaults",
+        "cpython3-interp-host-prebuilts",
+    ],
+    host_supported: true,
+    device_supported: false,
+    export_include_dirs: ["Include"],
+    target: {
+        darwin: {
+            export_include_dirs: ["android/darwin/pyconfig"],
+        },
+        linux_bionic: {
+            export_include_dirs: ["android/bionic/pyconfig"],
+        },
+        linux_glibc_x86_64: {
+            export_include_dirs: ["android/linux_x86_64/pyconfig"],
+        },
+        linux_musl_x86_64: {
+            export_include_dirs: ["android/linux_x86_64/pyconfig"],
+        },
+        linux_musl_arm64: {
+            export_include_dirs: ["android/linux_arm64/pyconfig"],
+        },
+    },
+    visibility: ["//visibility:public"],
+}
+
 cc_binary {
     name: "py3-launcher",
     defaults: ["py3-launcher-defaults"],