From 007bbffbeccf9d652d8bd56de85a9f615ad1361e Mon Sep 17 00:00:00 2001 From: Vahid Tavanashad Date: Sat, 17 May 2025 08:51:07 -0700 Subject: [PATCH] add scipy to runtime dependency --- .github/workflows/conda-package-cf.yml | 4 ++-- .github/workflows/conda-package.yml | 5 ++--- .gitignore | 1 + conda-recipe-cf/meta.yaml | 2 +- conda-recipe/meta.yaml | 2 +- mkl_fft/tests/third_party/scipy/test_basic.py | 4 ++-- pyproject.toml | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/conda-package-cf.yml b/.github/workflows/conda-package-cf.yml index 02be2c5..3036cc3 100644 --- a/.github/workflows/conda-package-cf.yml +++ b/.github/workflows/conda-package-cf.yml @@ -132,7 +132,7 @@ jobs: - name: Install mkl_fft run: | CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}" - conda create -n ${{ env.TEST_ENV_NAME }} python=${{ matrix.python_ver }} ${{ matrix.numpy }} $PACKAGE_NAME pytest scipy $CHANNELS + conda create -n ${{ env.TEST_ENV_NAME }} python=${{ matrix.python_ver }} ${{ matrix.numpy }} $PACKAGE_NAME pytest $CHANNELS # Test installed packages conda list -n ${{ env.TEST_ENV_NAME }} @@ -295,7 +295,7 @@ 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 }} ${{ matrix.numpy }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} - name: Report content of test environment diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index f3bc08d..a80cd61 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -131,8 +131,7 @@ jobs: - name: Install mkl_fft run: | CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}" - conda create -n ${{ env.TEST_ENV_NAME }} python=${{ matrix.python }} "scipy>=1.10" $CHANNELS - conda install -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME pytest $CHANNELS + conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME python=${{ matrix.python }} pytest $CHANNELS # Test installed packages conda list -n ${{ env.TEST_ENV_NAME }} @@ -296,7 +295,7 @@ 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 }} - name: Report content of test environment diff --git a/.gitignore b/.gitignore index b0117ba..b773865 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ __pycache__/ mkl_fft/_pydfti.c mkl_fft/_pydfti.cpython*.so +mkl_fft/_pydfti.*-win_amd64.pyd mkl_fft/src/mklfft.c diff --git a/conda-recipe-cf/meta.yaml b/conda-recipe-cf/meta.yaml index 73da10d..80d11fe 100644 --- a/conda-recipe-cf/meta.yaml +++ b/conda-recipe-cf/meta.yaml @@ -26,13 +26,13 @@ requirements: - python - mkl-service - numpy + - scipy >=1.10.1 test: commands: - pytest -v --pyargs mkl_fft requires: - pytest - - scipy imports: - mkl_fft - mkl_fft.interfaces diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 75f227a..7784f4a 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -26,13 +26,13 @@ requirements: - python - mkl-service - {{ pin_compatible('numpy') }} + - scipy >=1.10.1 test: commands: - pytest -v --pyargs mkl_fft requires: - pytest - - scipy imports: - mkl_fft - mkl_fft.interfaces diff --git a/mkl_fft/tests/third_party/scipy/test_basic.py b/mkl_fft/tests/third_party/scipy/test_basic.py index f05034c..5129510 100644 --- a/mkl_fft/tests/third_party/scipy/test_basic.py +++ b/mkl_fft/tests/third_party/scipy/test_basic.py @@ -13,10 +13,10 @@ from pytest import raises as assert_raises # pylint: disable=possibly-used-before-assignment -if scipy.__version__ < "1.12": +if np.lib.NumpyVersion(scipy.__version__) < "1.12.0": # scipy from Intel channel is 1.10 with python 3.9 and 3.10 pytest.skip("This test file needs scipy>=1.12", allow_module_level=True) -elif scipy.__version__ < "1.14": +elif np.lib.NumpyVersion(scipy.__version__) < "1.14.0": # For python-3.11 and 3.12, scipy<1.14 is installed from Intel channel # For python<=3.9, scipy<1.14 is installed from conda channel # pylint: disable=no-name-in-module diff --git a/pyproject.toml b/pyproject.toml index eefe397..d76960e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ classifiers = [ "Operating System :: POSIX", "Operating System :: Unix" ] -dependencies = ["numpy>=1.26.4", "mkl-service"] +dependencies = ["numpy>=1.26.4", "mkl-service", "scipy>=1.10.1"] description = "MKL-based FFT transforms for NumPy arrays" dynamic = ["version"] keywords = ["DFTI", "FFT", "Fourier", "MKL"] @@ -59,7 +59,7 @@ readme = {file = "README.md", content-type = "text/markdown"} requires-python = ">=3.9,<3.13" [project.optional-dependencies] -test = ["pytest", "scipy"] +test = ["pytest"] [project.urls] Download = "http://github.com/IntelPython/mkl_fft"