Skip to content

Gradle plugin: expose per-target CPython include directories as a public Provider #46

Closed

Description

@b-re-w

What

The Gradle plugin should publish, for each target, the include directory of the CPython it downloads. Each value is a Provider<Directory> keyed by target and flavour; free-threaded is a separate key. The task that extracts the tree comes along as the provider's task dependency. pypackpack's compile slot (TypedPython M3, #25) takes these as input.

Current locations, from the build-time acquisition tree python-multiplatform/build/python-standalone/extracted/:

Target Include directory
Desktop (macos-aarch64, macos-x86_64, linux-x86_64, windows-x86_64) <target>/python/include
Desktop, free-threaded 3.14.7/<target>-freethreaded/python/include
Android (android-aarch64, android-x86_64) <target>/prefix/include
iOS ios/Python.xcframework/<slice>/include

Why

A TypedPython extension has to be compiled against the headers, ABI tag and flavour of the CPython the app embeds, not the host Python. Compilation happens at build time, so what is staged into PYTHONHOME does not matter here. The paths must be exposed as public build outputs, not hard-coded.

Owner

The leader.

Done when

A plugin test resolves the include provider for each target. Each one contains Python.h, and the free-threaded one is distinct from the default one. Resolving a provider runs the extraction task.

Activity

  1. b-re-w commented on Oct 3, 2026

    @b-re-w
    MemberAuthor

    Landed in develop via #55.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions