Skip to content

fix: abi3 run export handling for pixi-build-python#5751

Draft
pavelzw wants to merge 2 commits intoprefix-dev:mainfrom
pavelzw:abi3
Draft

fix: abi3 run export handling for pixi-build-python#5751
pavelzw wants to merge 2 commits intoprefix-dev:mainfrom
pavelzw:abi3

Conversation

@pavelzw
Copy link
Copy Markdown
Collaborator

@pavelzw pavelzw commented Mar 22, 2026

Description

Fix ABI3 dependency handling in pixi-build-python.

When abi3 = true, pixi was still producing a python_abi X.Y.* *_cpXY run dependency via the weak run export from host: python, even though the recipe was marked build.python.version_independent: true.

Root cause

pixi-build-python was mixing two different models for ABI3 packages:

  • it set build.python.version_independent = true
  • but it also treated ABI3 like a normal CPython extension build by adding python_abi logic / allowing host: python run exports to propagate

That caused regular CPython ABI pins to still appear in the resolved run dependencies.

Changes

  • stop treating abi3 = true as a python_abi host pin
  • for ABI3 builds, add ignore_run_exports.from_package = ["python"] so host: python does not inject the normal python_abi run export
  • extend the stage0/intermediate recipe model to carry and serialize ignore_run_exports
  • update pixi-build-python docs to describe the correct ABI3 behavior
  • update tests to cover the new generated recipe behavior

Result

ABI3 builds now:

  • remain version_independent
  • no longer inherit python's CPython ABI pin
  • rely on the explicit python-abi3 host dependency for ABI3-compatible run exports

Fixes conda/rattler#2197 (comment)

How Has This Been Tested?

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: codex

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.
  • I have verified that changes that would impact the JSON schema have been made in schema/model.py.

@pavelzw pavelzw changed the title Fix abi3 run export handling for pixi-build-python fix: abi3 run export handling for pixi-build-python Mar 22, 2026
@baszalmstra
Copy link
Copy Markdown
Contributor

Let me check this on Tuesday. I think we still need the lower/upperbound check.

@pavelzw
Copy link
Copy Markdown
Collaborator Author

pavelzw commented Mar 22, 2026

i also still need to look at the code here, this was entirely done by codex apart from my prompt

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants