Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebuild 2.0.2 with mkl v2025 #101

Draft
wants to merge 16 commits into
base: numpy20
Choose a base branch
from
5 changes: 5 additions & 0 deletions abs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
channels:
- https://staging.continuum.io/prefect/fs/intel_repack-feedstock/pr26/7ae728e
- https://staging.continuum.io/prefect/fs/mkl-service-feedstock/pr6/82a1a37
- https://staging.continuum.io/prefect/fs/mkl_random-feedstock/pr9/422492a
- https://staging.continuum.io/prefect/fs/mkl_fft-feedstock/pr11/005612d
2 changes: 2 additions & 0 deletions recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ c_compiler: # [win]
- vs2019 # [win]
cxx_compiler: # [win]
- vs2019 # [win]
mkl:
- 2025
4 changes: 2 additions & 2 deletions recipe/install_base.bat
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ if errorlevel 1 (
exit /b 1
)

:: `pip install dist\numpy*.whl` does not work on windows,
:: `pip install --no-deps --no-build-isolation dist\numpy*.whl` does not work on windows,
:: so use a loop; there's only one wheel in dist/ anyway
for /f %%f in ('dir /b /S .\dist') do (
pip install %%f
pip install --no-deps --no-build-isolation %%f
if %ERRORLEVEL% neq 0 exit 1
)

Expand Down
2 changes: 1 addition & 1 deletion recipe/install_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ $PYTHON -m build --wheel --no-isolation --skip-dependency-check \
-Csetup-args=-Dlapack=${BLAS} \
$EXTRA_OPTS \
|| (cat builddir/meson-logs/meson-log.txt && exit 1)
$PYTHON -m pip install dist/numpy*.whl
$PYTHON -m pip install --no-deps --no-build-isolation dist/numpy*.whl
23 changes: 16 additions & 7 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ source:
- patches/0004-Partially-revert-function-blocklisting-for-glibc-lt-2.18.patch # [s390x]

build:
number: 0
number: 1
# numpy 2.0.0 no longer supports Python 3.8: https://numpy.org/devdocs/release/2.0.0-notes.html
# "This release supports Python versions 3.9-3.12"
skip: True # [(blas_impl == 'openblas' and win)]
skip: True # [py<39 or py>=313]
skip: True # [not (linux and x86_64)]
force_use_keys:
- python

Expand Down Expand Up @@ -54,10 +55,14 @@ outputs:
- meson-python >=0.15.0
- python-build
# blas
- mkl-devel {{ mkl }} # [blas_impl == "mkl"]
- mkl-devel {{ mkl }} # [blas_impl == "mkl"]
- openblas-devel {{ openblas }} # [blas_impl == "openblas"]
run:
- python
run_constrained:
# restrict setuptools: see https://github.com/numpy/numpy/issues/27405
# TODO remove when numpy stop using distutils.msvccompiler from setuptools.
- setuptools <74

# When building out the initial package set for a new Python version / MKL version the
# recommendation is to build numpy-base but not numpy, then build
Expand All @@ -81,7 +86,7 @@ outputs:
host:
- python
# these import blas metapackages to ensure consistency with downstream libs that also use blas
- mkl-devel {{ mkl }} # [blas_impl == 'mkl']
- mkl-devel {{ mkl }} # [blas_impl == 'mkl']
- openblas-devel {{ openblas }} # [blas_impl == 'openblas']
run:
- python
Expand All @@ -106,7 +111,6 @@ outputs:
# https://github.com/numpy/numpy/issues/27045
{% set tests_to_skip = tests_to_skip + " or (test_regression and test_gh25784)" %} # [osx]


test:
requires:
- pip
Expand All @@ -127,9 +131,10 @@ outputs:
commands:
- f2py -h
- python -c "import numpy; numpy.show_config()"
- export OPENBLAS_NUM_THREADS=1 # [unix]
- set OPENBLAS_NUM_THREADS=1 # [win]
- export CPU_COUNT=4 # [linux and ppc64le]
- export OPENBLAS_NUM_THREADS=1 # [unix and blas_impl != 'mkl']
- set OPENBLAS_NUM_THREADS=1 # [win and blas_impl != 'mkl']
- export MKL_NUM_THREADS=1 # [unix and blas_impl == 'mkl']
- export MKL_DISABLE_FAST_MM=1 # [unix and blas_impl == 'mkl']
- pytest -vv --pyargs numpy -k "not ({{ tests_to_skip }})" --durations=50 --durations-min=1.0
imports:
- numpy
Expand Down Expand Up @@ -186,6 +191,10 @@ about:
dev_url: https://github.com/numpy/numpy

extra:
skip-lints:
- missing_imports_or_run_test_py
- missing_tests
- host_section_needs_exact_pinnings
recipe-maintainers:
- jakirkham
- msarahan
Expand Down