Update ABI3 documentation
We found a few problems with py-rattler ABI3 packages. It would be good to update the docs or improve the docs to also include the new findings:
https://github.com/conda-forge/py-rattler-feedstock/pull/42
Cross-compiling: ignore run exports coming from cross-python_${{ target_platform }}.
Do not depend on bare python in run to avoid python pin.
Just wanted to chime in here because I'm having some trouble with what rattler-build produces when I try to build abi3 python packages.
I get the following in index.json:
{
"arch": "x86_64",
"build": "h81b34b9_0",
"build_number": 0,
"constrains": [
"__glibc >=2.17"
],
"depends": [
"python >=3.9",
"conda >=24.11.0",
"click",
"_python_abi3_support 1.*",
"python >=3.13",
"openssl >=3.4.1,<4.0a0"
],
"name": "conda-rlock",
"noarch": "python",
"platform": "linux",
"subdir": "linux-64",
"timestamp": 1741646816508,
"version": "0.1.0"
}
The strange part is that Python appears twice (python >= 3.9 and python >=3.13).
My recipe is here:
- https://github.com/travishathaway/conda-rlock/tree/main/recipe
And this was the output at the end of rattler-build:
│ │ ╭──────────────────────┬────────────────────────────────────────╮
│ │ │ Name ┆ Spec │
│ │ ╞══════════════════════╪════════════════════════════════════════╡
│ │ │ Run dependencies ┆ │
│ │ │ python ┆ >=3.9 │
│ │ │ conda ┆ >=24.11.0 │
│ │ │ click ┆ │
│ │ │ _python_abi3_support ┆ 1.* (RE of [host: python-abi3]) │
│ │ │ python ┆ >=3.13 (RE of [host: python-abi3]) │
│ │ │ openssl ┆ >=3.4.1,<4.0a0 (RE of [host: openssl]) │
│ │ │ ┆ │
│ │ │ Run constraints ┆ │
│ │ │ __glibc ┆ >=2.17 (RE of [build: rust_linux-64]) │
│ │ ╰──────────────────────┴────────────────────────────────────────╯
│ │
Yes, I think you need to select a version of python-abi3 that corresponds to your lower bound of Python ...
That make sense. So, if I have this in my Cargo.toml:
[dependencies]
pyo3 = { version = "0.23.4", features = ["extension-module", "abi3-py39"] } # Python 3.9
Then I have to have the following in the recipe:
# ... snip
host:
- python >=3.9
- python-abi3 =3.9
# ... snip
The only thing that's still a little confusing is that python appears twice in the run dependencies at the end. I was able to work around that by simply leaving python out of the run section because it gets added later.
I updated the docs and we also fixed the additional python ignore