Repository navigation
[MAINT] Strip pip extras from build dependencies in conda recipe - #2432
ndgrigorian wants to merge 2 commits into
Conversation
conda 26.10 rejects specs like versioneer[toml]==0.29 when rendering the recipe
|
View rendered docs @ https://intelpython.github.io/dpctl/pulls/2432/index.html |
without a bound the solver keeps the installed env and picks cmake 3.5.0
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the conda dependency normalization and Linux example CMake requirement changes.
No open issues 🎉
What changed in this PR
This PR addresses conda 26.10.0 compatibility issues in package builds and Linux example CI.
Changes:
- Strips pip extras from build-system dependencies before adding them to conda host requirements.
- Requires CMake ≥3.22 in the Linux examples environment to prevent selection of an unsupported older version.
| File | Description |
|---|---|
conda-recipe/meta.yaml |
Removes extras syntax so requirements such as versioneer[toml]==0.29 become valid conda specifications. |
.github/workflows/conda-package.yml |
Adds the CMake lower bound required by the Linux examples. |
Review effort: Balanced
antonwolfy
left a comment
There was a problem hiding this comment.
The recipe change fixes the render error: all build_linux and build_windows jobs pass in both workflows, including 3.15. The cmake bound does not fix the Linux examples jobs in conda-package.yml, though: both of them (3.15 cp315 and 3.14 cp314t) now fail at the changed line instead of later at CMake, see the inline comment.
The failing "Build with nightly build of DPC++ toolchain on Windows" job is unrelated: it fails in the pin/tag check step, and the same workflow fails on other branches too.
| echo "Environment created" | ||
| # shellcheck disable=SC2086 | ||
| conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y cmake ninja $CHANNELS || exit 1 | ||
| conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y "cmake>=3.22" ninja $CHANNELS || exit 1 |
There was a problem hiding this comment.
Both test_examples_linux jobs fail at this line:
PackagesNotFoundInChannelsError: The following packages are not available from current channels:
- python3.14.*.* (python3.15.*.* on the 3.15 job)
CI does not run conda 26.10.0 here. The "Install conda-index" step (conda install conda-index=... -c conda-forge) supersedes base conda with conda-forge's conda-26.7.3 while conda-rattler-solver 26.11.0 from pkgs/main stays, and it swaps certifi (the log shows Failed to export: Could not find a suitable TLS CA certificate bundle). With conda 26.10.0 and rattler locally, this exact install solves to cmake 4.x and bare cmake gives cmake-3.5.0-3, so the local check holds, just not for the conda CI ends up with.
Options: install cmake ninja pybind11 cython scikit-build in the same conda create as python/pytest/setuptools, as conda-package-cf.yml does (its examples jobs pass in this run), or keep the conda-index step from downgrading conda, e.g. by adding "conda>=26.10" to that install.
| {% elif '[' in dep %} | ||
| # strip pip extras, conda does not accept them | ||
| - {{ dep.split('[')[0] ~ dep.split(']')[1] }} |
There was a problem hiding this comment.
Nit: this branch skips the replace('_','-') of the else branch and keeps any ; marker, so a later foo_bar[x] or foo[x]; marker dep would render differently than without extras. It is fine for versioneer[toml]==0.29 today. Stripping the extras first, e.g. {% set dep = dep.split('[')[0] ~ dep.split(']')[1] if '[' in dep else dep %} at the top of the loop, would let the dep fall through to the existing branches, and the comment would not sit inside the loop.
|
Superseded by #2409 |
This PR fixes conda package builds, which fail at recipe rendering since conda 26.10.0 started rejecting pip extras in match specs. The recipe copies
versioneer[toml]==0.29from[build-system].requiresinpyproject.tomlinto host requirements, so allbuild_linuxandbuild_windowsjobs fail withThe extras are now stripped from build-system requirements, producing
versioneer==0.29. Thetomlextra only pulls intomlion Python < 3.11, which the recipe already listsThis PR also adds a lower bound on cmake in the Linux examples environment. Since conda 26.10.0 the default solver is rattler, which avoids changing packages already installed in the environment, so a bare
cmakeresolves tocmake-3.5.0-3on Python 3.14t and 3.15, and the examples fail withRequiring
cmake>=3.22, the highest minimum among the examples, resolves to cmake 4.5.1, which the subsequentpybind11 cython scikit-buildinstall keepsChecked locally with conda 26.10.0 and conda-build 26.3.0: on master
conda renderreproduces the error, this branch renders and resolvesversioneer 0.29, and the examples env solves reproduce cmake 3.5.0 without the bound and cmake 4.5.1 with it