From 98d2c4bd72b8d4bbd944d69de4141a067eb2de3b Mon Sep 17 00:00:00 2001 From: Vahid Tavanashad Date: Thu, 7 Aug 2025 08:48:35 -0700 Subject: [PATCH] update recipe to use numpy-base and relax mkl-devel condition --- .github/workflows/conda-package.yml | 13 +++++++++++-- conda-recipe/meta.yaml | 3 +-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index c474578..315f964 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -140,7 +140,13 @@ jobs: - name: Install mkl_fft run: | CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}" - conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${{ env.PACKAGE_VERSION }} python=${{ matrix.python }} pytest "scipy>=1.10" $CHANNELS + conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${{ env.PACKAGE_VERSION }} python=${{ matrix.python }} pytest $CHANNELS + if [[ "${{ matrix.python }}" != 3.9* ]]; then + # Intel channel only has scipy=1.10 for Python 3.9, which needs mkl<2025 + # while scipy needs to install numpy and mkl_random and mkl_random-1.2.11 requires mkl>=2025 + # so avoid installing scipy for Python 3.9 which means third_party/scipy tests will not run + conda install -n ${{ env.TEST_ENV_NAME }} "scipy>=1.10" $CHANNELS + fi # Test installed packages conda list -n ${{ env.TEST_ENV_NAME }} @@ -307,8 +313,11 @@ jobs: FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO ( SET PACKAGE_VERSION=%%F ) - SET "TEST_DEPENDENCIES=pytest scipy" + SET "TEST_DEPENDENCIES=pytest" conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} + if ("${{ matrix.python }}" -ne "3.9") { + conda install -n ${{ env.TEST_ENV_NAME }} scipy -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} + } - name: Report content of test environment shell: cmd /C CALL {0} diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 05222b1..35e36d8 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -20,13 +20,12 @@ requirements: - python - setuptools >=77 - mkl-devel - - mkl-devel 2024.2.* # [py==39] - cython - numpy-base run: - python - mkl-service - - {{ pin_compatible('numpy') }} + - {{ pin_compatible('numpy-base') }} test: commands: