Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions .github/workflows/conda-package-cf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ jobs:
- python: "3.10"
numpy: "2.2"
- python: "3.11"
numpy: "2.3"
numpy: "2.4"
- python: "3.12"
numpy: "2.3"
numpy: "2.5"
- python: "3.13"
numpy: "2.3"
numpy: "2.5"
- python: "3.14"
numpy: "2.3"
numpy: "2.5"
python_spec: "3.14.* *_cp314"
python_tag: "3.14"
- python: "3.14"
numpy: "2.3"
numpy: "2.5"
python_spec: "3.14.* *_cp314t"
python_tag: "3.14t"
- python: "3.15"
Expand Down Expand Up @@ -96,6 +96,7 @@ jobs:

conda build \
"${TEST[@]}" \
--error-overlinking \
"${VERSIONS[@]}" \
"${CHANNELS[@]}" \
conda-recipe-cf
Expand Down Expand Up @@ -222,17 +223,17 @@ jobs:
- python: "3.10"
numpy: "2.2"
- python: "3.11"
numpy: "2.3"
numpy: "2.4"
- python: "3.12"
numpy: "2.3"
numpy: "2.5"
- python: "3.13"
numpy: "2.3"
numpy: "2.5"
- python: "3.14"
numpy: "2.3"
numpy: "2.5"
python_spec: "3.14.* *_cp314"
python_tag: "3.14"
- python: "3.14"
numpy: "2.3"
numpy: "2.5"
python_spec: "3.14.* *_cp314t"
python_tag: "3.14t"
- python: "3.15"
Expand Down Expand Up @@ -286,7 +287,7 @@ jobs:
- name: Build conda package
run: |
conda activate
conda build --no-test --python "${{ matrix.python_spec || matrix.python }}" --numpy ${{ matrix.numpy }} -c conda-forge --override-channels conda-recipe-cf
conda build --no-test --error-overlinking --python "${{ matrix.python_spec || matrix.python }}" --numpy ${{ matrix.numpy }} -c conda-forge --override-channels conda-recipe-cf

- name: Upload artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Expand Down
8 changes: 5 additions & 3 deletions conda-recipe-cf/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
numpy:
- '1.26.4'
numpy: # as in conda-forge's global pinning; CI overrides it with --numpy
- '2'
c_compiler: # [linux]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: since the matrix always passes --numpy, dropping the 1.26.4 pin is fine for CI. But a plain local conda build conda-recipe-cf now falls back to conda-build's built-in numpy default (1.26), which gives a numpy-1-only package and isn't what the feedstock does. Could we put numpy: ['2'] here, matching conda-forge's global pinning? I believe the --numpy flag in CI would still take precedence.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, done in 1111c31, same as conda-forge's global pinning. Checked with conda render: without --numpy, py3.12 now builds against 2.5 instead of 1.26.4, py3.13 resolves at all, and --numpy 2.4 still takes precedence.

- gcc # [linux]
c_compiler_version: # [linux]
- '15' # [linux]
cxx_compiler: # [linux]
- gxx # [linux]
cxx_compiler_version: # [linux]
- '14' # [linux]
- '15' # [linux]
c_stdlib: # [linux]
- sysroot # [linux]
c_stdlib_version: # [linux]
Expand Down
13 changes: 8 additions & 5 deletions conda-recipe-cf/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ source:

build:
number: {{ buildnumber }}
ignore_run_exports_from:
- {{ compiler('dpcpp') }} # [linux]
ignore_run_exports:
- blas
- numpy
- llvm-openmp
missing_dso_whitelist:
- $RPATH/mkl_umath_loops.dll # [win]

requirements:
build:
Expand All @@ -29,14 +31,15 @@ requirements:
- cython >=3.1.0
- python
- mkl-devel
- intel-cmplr-lib-rt # [not osx]
- numpy

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With pin_compatible gone, the numpy run dep now comes from numpy's run_exports, so the 3.12+ builds against 2.5 accept numpy >=1.25,<3 instead of >=2.3,<3. That's what the feedstock ships too, but the test jobs only install numpy>=2, which resolves to the newest, so nothing here exercises the low end. Worth adding one test leg pinned to the oldest numpy we claim (1.26.4 per pyproject)? A feedstock-only breakage at that end would then show up here as well.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, the low end turned out to be broken, not just untested. USE_NUMPY_2 is set at compile time from the NumPy headers (mkl_umath_loops.c.src), so a build against NumPy 2 carries NumPy 2's complex sign and the int64 ldexp loops. I installed the published feedstock 0.6.0 build with NumPy 1.26.4 (py3.12) and 1.23.5 (py3.11) on Linux, and the complex sign tests fail: np.sign(3+4j) gives 0.6+0.8j instead of NumPy 1's 1+0j. On Windows, NumPy 1.x's ldexp only has int/long (32-bit) loops, so the patcher won't find a match for the int64 ones and patch_numpy_umath() raises. So instead of a NumPy 1 test job I added numpy >=2 to run: in 1111c31; together with the run_exports that gives >=2,<3. NumPy 2.0.2 passes the whole suite locally, so I didn't extend the matrix. The feedstock needs the same fix, I'll follow up there.

- llvm-openmp
- pip
run:
- python
- {{ pin_compatible('mkl') }}
- {{ pin_compatible('numpy') }}
- {{ pin_compatible('intel-cmplr-lib-rt') }}
# NumPy 1 vs 2 loops are chosen at compile time (USE_NUMPY_2), so a build
# against NumPy 2 must not run on NumPy 1.x; run_exports add the upper bound
- numpy >=2

test:
requires:
Expand Down
Loading