Skip to content

Update to 1.6.1 and test on libvips - #49

Merged
isuruf merged 3 commits into
conda-forge:mainfrom
conda-forge-admin:conda_forge_admin_48
Sep 14, 2026
Merged

isuruf merged 3 commits into
conda-forge:mainfrom
conda-forge-admin:conda_forge_admin_48

Conversation

@conda-forge-admin

@conda-forge-admin conda-forge-admin commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

I tested this with conda-forge/pyvips-feedstock#44 by uploading it to my own channel, then trying to build out libvips

without it, I needed a local patch to libvips which I presume would have to be replicated in other feedstocks.

Fixes #48

@conda-forge-admin

conda-forge-admin commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/recipe.yaml) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipe/recipe.yaml:

  • ℹ️ noarch: python packages install on every Python version at or above python_min, but at least one python test only runs against a single python_version. Consider testing against both the minimum and a latest supported Python:
tests:
  - python:
      python_version:
        - ${{ python_min }}.*
        - "*"
  • ℹ️ 'Store Build Artifacts' is deprecated.
    Deprecated. Store the conda build_artifacts directory as an Azure pipeline artifact. Use workflow_settings.store_build_artifacts instead.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/34043484102. Examine the logs at this URL for more detail.

@conda-forge-admin
conda-forge-admin marked this pull request as ready for review September 6, 2026 15:42
<details><summary>Claude's draft</summary>

crossenv 1.6.0 is what conda-forge needs for Python 3.15 cross builds: it
overrides importlib.machinery.EXTENSION_SUFFIXES with the host EXT_SUFFIX plus
a plain ".abi3.so", so setuptools' get_abi3_suffix() stops naming abi3
extensions after the build interpreter. Without it, cffi/py_limited_api packages
cross-compiled for ppc64le get _mod.abi3-x86_64-linux-gnu.so and the host
interpreter refuses to import them (conda-forge/cross-python-feedstock#109).

Bumping alone is not enough. 1.6.0 also added an unconditional

    executable = <venv>/cross/bin/python

to sys-patch.py.tmpl. cross-python copies that wrapper to
<venv>/bin/cross-python, installs cross_python_shim at $PREFIX/bin/python and
then removes <venv>/cross, so sys.executable named a path that had just been
deleted and every cross build died in pip:

    ERROR: Error [Errno 2] No such file or directory:
      '.../_build_env/venv/cross/bin/python' while executing command
      Preparing metadata (pyproject.toml)

0004 guards that assignment on the wrapper still being present. Upstream's
behaviour is kept where it applies; elsewhere sys.executable stays whatever the
environment already arranged, which on conda-forge is the shim that execs
cross-python. That is the 1.5.0 behaviour CI passes with today.

Dropped patches: gh121 reverse-applies against 1.6.1 and both gh130 hunks
(compile(src, patch, "exec"), posix.uname_result) are upstream. 0002 added
*args to _get_sysconfigdata_name for 3.8; python_min is 3.10 and 1.6.1 never
calls it with arguments. gh119 was already unreferenced.

1.6.1 builds with hatchling rather than setuptools, hence the added host dep.

Verified by building this recipe locally and running pyvips-feedstock#44's
linux_ppc64le_python3.15 config against it with that PR's setup.py patch
reverted: _libvips.abi3.so, imports and pip check pass under qemu-ppc64le.

Resume this Claude session:
```
cd /home/mark/git/feedstock/crossenv-feedstock-pr49
claude --resume 425a4697-7af5-4b8b-8ab6-352d4c27290f
```
</details>

Claude-Session: https://claude.ai/code/session_017RwqztCXdKrXGfFiCLvc8s
@hmaarrfk hmaarrfk changed the title chore: rerender Update to 1.6.1 and test on libvips Sep 6, 2026
@MementoRC

Copy link
Copy Markdown

Your hint on the issue I opened led me to try this:

          if [ "${CONDA_BUILD_CROSS_COMPILATION:-0}" = "1" ]; then
            for _f in "${PREFIX}"/lib/python*/site-packages/tree_sitter_embedded_template/_binding.abi3-*.so; do
              [ -e "${_f}" ] || continue
              _want="$(dirname "${_f}")/_binding.abi3.so"
              echo "cross-build: renaming $(basename "${_f}") -> $(basename "${_want}")"
              mv -f "${_f}" "${_want}"
            done
          fi

It resolved the issue I had with ppc64le 3.15: conda-forge/tree-sitter-embedded-template-feedstock#7

Hope this helps

@MementoRC

Copy link
Copy Markdown

@hmaarrfk I wish I could help, but this feels like above my brain-grade! 'hack' it'll be for my recipes - unless you think I could help in some way, I don't have much brain, but I have lots of time

@MementoRC

MementoRC commented Sep 14, 2026 •

Copy link
Copy Markdown

Just a thought, could a downstream: tree-sitter-embedded-template help confirm that this is the right fix? It is a small and fast build, setuptools >=42 + py_limited_api extension that hits get_abi3_suffix() on the exact path 1.6.1 changes. I'd remove the 'hack', get a red after merge and this PR would still be green (assuming I understand the process correctly, my chickpea is overheating already)

@MementoRC

Copy link
Copy Markdown

Ok, last noise around this from me:

Tested this locally on an x86_64 -> linux-ppc64le cross build with Python 3.15, since that is where I hit the abi3 suffix mismatch downstream.

Build interpreter, x86_64 CPython 3.15.0rc2, _imp.extension_suffixes():

['.cpython-315-x86_64-linux-gnu.so', '.abi3-x86_64-linux-gnu.so', '.abi3.so',
'.abi3t-x86_64-linux-gnu.so', '.abi3t.so', '.so']

Inside a cross-python built from this PR (crossenv 1.6.1 + patches/0004), host linux-ppc64le:

EXTENSION_SUFFIXES : ['.cpython-315-powerpc64le-linux-gnu.so', '.abi3.so', '.so']
get_abi3_suffix() : .abi3.so
EXT_SUFFIX : .cpython-315-powerpc64le-linux-gnu.so
platform : linux-ppc64le

With crossenv 1.5.0 there is no EXTENSION_SUFFIXES line in importlib-machinery-patch.py.tmpl, so get_abi3_suffix() takes the first .abi3 entry from the build interpreter's list above, which is .abi3-x86_64-linux-gnu.so.

So 1.6.1 gives the plain .abi3.so on a cross build. I can drop the rename workaround I am carrying in tree-sitter-embedded-template (and others) once this lands.

One question: the list is [ext_suffix, ".abi3.so", ".so"] with no .abi3t entry. On a free-threaded build the plain .abi3 suffixes are not in _PyImport_DynLoadFiletab at all, since they sit inside the #ifndef Py_GIL_DISABLED
block in Python/dynload_shlib.c. Does that matter for free-threaded cross builds, or is it out of scope here? I have not tested one.

@isuruf

isuruf commented Sep 14, 2026

Copy link
Copy Markdown
Member

@MementoRC we should fix https://github.com/robotpy/crossenv/blob/a9434e8d5faaf9149fd23a654dd2a5670aef2c45/crossenv/scripts/importlib-machinery-patch.py.tmpl#L32 for 3.15+

@MementoRC

Copy link
Copy Markdown

@jakirkham

Copy link
Copy Markdown
Member

Am not fully caught up here, but just want to mention we ran into the same issue with macOS triples not working in XGBoost that Memento is fixing in PR: robotpy/crossenv#166

For now we are taking the approach of pinning crossenv in the XGBoost recipe

@isuruf

isuruf commented Sep 15, 2026

Copy link
Copy Markdown
Member

Fixed in #50 (comment)

@jakirkham

Copy link
Copy Markdown
Member

Thanks Isuru! 🙏

Will give that a try

@jakirkham

Copy link
Copy Markdown
Member

Just to confirm, the XGBoost macOS ARM build was fixed with PR: #50

Thanks again Isuru! 🙏

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.

@conda-forge-admin please rerender

5 participants