Skip to content

Commit 24c4ecf

Browse files
authored
Merge pull request #285 from IntelPython/update-conda-forge-recipe
Align conda-forge recipe with normal recipe
2 parents ed67c10 + 074cded commit 24c4ecf

8 files changed

Lines changed: 68 additions & 50 deletions

File tree

.github/workflows/build_pip.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,8 @@ jobs:
3737

3838
- uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0
3939
with:
40-
use-mamba: true
4140
miniforge-version: latest
4241
channels: conda-forge
43-
conda-remove-defaults: true
4442
activate-environment: test
4543
python-version: ${{ matrix.python }}
4644

.github/workflows/conda-package-cf.yml

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888

8989
strategy:
9090
matrix:
91-
python_ver: ["3.10", "3.11", "3.12", "3.13", "3.14"]
91+
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
9292
numpy: ['numpy">=2"']
9393
experimental: [false]
9494
runner: [ubuntu-latest]
@@ -100,7 +100,7 @@ jobs:
100100
- name: Download artifact
101101
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
102102
with:
103-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python_ver }}
103+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
104104

105105
- name: Add conda to system path
106106
run: echo "$CONDA"/bin >> "$GITHUB_PATH"
@@ -119,7 +119,7 @@ jobs:
119119
- name: Collect dependencies
120120
run: |
121121
CHANNELS=(-c "$GITHUB_WORKSPACE"/channel ${{ env.CHANNELS }})
122-
conda create -n ${{ env.TEST_ENV_NAME }} "$PACKAGE_NAME" python=${{ matrix.python_ver }} ${{ matrix.numpy }} "${CHANNELS[@]}" --only-deps --dry-run > lockfile
122+
conda create -n ${{ env.TEST_ENV_NAME }} "$PACKAGE_NAME" python=${{ matrix.python }} ${{ matrix.numpy }} "${CHANNELS[@]}" --only-deps --dry-run > lockfile
123123
124124
- name: Display lockfile
125125
run: cat lockfile
@@ -135,15 +135,15 @@ jobs:
135135
with:
136136
path: ~/.conda/pkgs
137137
key:
138-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_ver }}-${{hashFiles('lockfile') }}
138+
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('lockfile') }}
139139
restore-keys: |
140-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_ver }}-
140+
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
141141
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
142142
143143
- name: Install mkl_fft
144144
run: |
145145
CHANNELS=(-c "$GITHUB_WORKSPACE"/channel ${{ env.CHANNELS }})
146-
conda create -n ${{ env.TEST_ENV_NAME }} python=${{ matrix.python_ver }} ${{ matrix.numpy }} "$PACKAGE_NAME" pytest scipy "${CHANNELS[@]}"
146+
conda create -n ${{ env.TEST_ENV_NAME }} python=${{ matrix.python }} ${{ matrix.numpy }} "$PACKAGE_NAME" pytest scipy "${CHANNELS[@]}"
147147
# Test installed packages
148148
conda list -n ${{ env.TEST_ENV_NAME }}
149149
@@ -155,7 +155,9 @@ jobs:
155155
156156
build_windows:
157157
runs-on: windows-latest
158-
158+
defaults:
159+
run:
160+
shell: cmd /C CALL {0}
159161
strategy:
160162
matrix:
161163
include:
@@ -184,12 +186,13 @@ jobs:
184186
with:
185187
miniforge-version: latest
186188
activate-environment: build
187-
python-version: ${{ matrix.python }}
188189
channels: conda-forge
189-
conda-remove-defaults: 'true'
190+
python-version: ${{ matrix.python }}
190191

191192
- name: Install conda-build
192-
run: conda install -n base conda-build
193+
run: |
194+
conda install -n base -y conda-build
195+
conda list -n base
193196
194197
- name: Cache conda packages
195198
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
@@ -203,12 +206,8 @@ jobs:
203206
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
204207
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
205208
206-
- name: Setup MSVC
207-
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
208-
209209
- name: Build conda package with NumPy 2.x
210210
run: |
211-
conda activate
212211
conda build --no-test --python ${{ matrix.python }} --numpy ${{ matrix.numpy }} -c conda-forge --override-channels conda-recipe-cf
213212
214213
- name: Store conda paths as envs
@@ -231,7 +230,7 @@ jobs:
231230

232231
strategy:
233232
matrix:
234-
python_ver: ["3.10", "3.11", "3.12", "3.13", "3.14"]
233+
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
235234
numpy: ['numpy">=2"']
236235
experimental: [false]
237236
runner: [windows-latest]
@@ -244,15 +243,14 @@ jobs:
244243
- name: Download artifact
245244
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
246245
with:
247-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python_ver }}
246+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
248247

249248
- uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0
250249
with:
251250
miniforge-version: latest
252-
activate-environment: ${{ env.TEST_ENV_NAME }}
253-
python-version: ${{ matrix.python_ver }}
254251
channels: conda-forge
255-
conda-remove-defaults: 'true'
252+
activate-environment: ${{ env.TEST_ENV_NAME }}
253+
python-version: ${{ matrix.python }}
256254

257255
- name: Create conda channel with the artifact bit
258256
shell: cmd /C CALL {0}
@@ -291,7 +289,7 @@ jobs:
291289
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
292290
SET PACKAGE_VERSION=%%F
293291
)
294-
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python_ver }} ${{ matrix.numpy }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
292+
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} ${{ matrix.numpy }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
295293
296294
- name: Display lockfile content
297295
shell: pwsh
@@ -304,9 +302,9 @@ jobs:
304302
with:
305303
path: /home/runner/conda_pkgs_dir
306304
key:
307-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_ver }}-${{hashFiles('lockfile') }}
305+
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('lockfile') }}
308306
restore-keys: |
309-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_ver }}-
307+
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
310308
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
311309
312310
- name: Install mkl_fft
@@ -321,7 +319,7 @@ jobs:
321319
SET PACKAGE_VERSION=%%F
322320
)
323321
SET "TEST_DEPENDENCIES=pytest scipy"
324-
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python=${{ matrix.python_ver }} ${{ matrix.numpy }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }}
322+
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 }}
325323
326324
- name: Report content of test environment
327325
shell: cmd /C CALL {0}

.github/workflows/conda-package.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ jobs:
155155
156156
build_windows:
157157
runs-on: windows-latest
158-
158+
defaults:
159+
run:
160+
shell: cmd /C CALL {0}
159161
strategy:
160162
matrix:
161163
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
@@ -173,14 +175,13 @@ jobs:
173175
with:
174176
miniforge-version: latest
175177
activate-environment: build
176-
python-version: ${{ matrix.python }}
177178
channels: conda-forge
178-
conda-remove-defaults: 'true'
179+
python-version: ${{ matrix.python }}
179180

180181
- name: Install conda-build
181182
run: |
182-
conda activate
183-
conda install -n base conda-build
183+
conda install -n base -y conda-build
184+
conda list -n base
184185
185186
- name: Cache conda packages
186187
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
@@ -194,12 +195,8 @@ jobs:
194195
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
195196
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
196197
197-
- name: Setup MSVC
198-
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
199-
200198
- name: Build conda package
201199
run: |
202-
conda activate
203200
conda build --no-test --python ${{ matrix.python }} -c https://software.repos.intel.com/python/conda -c conda-forge --override-channels conda-recipe
204201
205202
- name: Store conda paths as envs
@@ -239,10 +236,9 @@ jobs:
239236
- uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0
240237
with:
241238
miniforge-version: latest
239+
channels: conda-forge
242240
activate-environment: ${{ env.TEST_ENV_NAME }}
243241
python-version: ${{ matrix.python }}
244-
channels: conda-forge
245-
conda-remove-defaults: 'true'
246242

247243
- name: Create conda channel with the artifact bit
248244
shell: cmd /C CALL {0}

conda-recipe-cf/bld.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
set MKLROOT=%PREFIX%
2-
%PYTHON% -m pip install --no-build-isolation --no-deps .
2+
%PYTHON% setup.py build --force install --old-and-unmanageable
33
if errorlevel 1 exit 1

conda-recipe-cf/build.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash -x
22

3-
export MKLROOT=$PREFIX
4-
export CFLAGS="-I$PREFIX/include $CFLAGS"
5-
$PYTHON -m pip install --no-build-isolation --no-deps .
3+
# make sure that compiler has been sourced, if necessary
4+
5+
export MKLROOT=${PREFIX}
6+
$PYTHON setup.py build --force install --old-and-unmanageable
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
c_compiler: # [linux]
2+
- gcc # [linux]
3+
cxx_compiler: # [linux]
4+
- gxx # [linux]
5+
cxx_compiler_version: # [linux]
6+
- '14' # [linux]
7+
c_stdlib: # [linux]
8+
- sysroot # [linux]
9+
c_stdlib_version: # [linux]
10+
- '2.28' # [linux]
11+
c_stdlib: # [win]
12+
- vs # [win]
13+
cxx_compiler: # [win]
14+
- vs2022 # [win]
15+
c_compiler: # [win]
16+
- vs2022 # [win]

conda-recipe-cf/meta.yaml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
1-
{% set version = "2.2.0dev1" %}
2-
{% set buildnumber = 0 %}
3-
41
package:
52
name: mkl_fft
6-
version: {{ version }}
3+
version: {{ GIT_DESCRIBE_TAG }}
74

85
source:
96
path: ../
107

118
build:
12-
number: {{ buildnumber }}
9+
number: {{ GIT_DESCRIBE_NUMBER }}
1310
ignore_run_exports:
1411
- blas
1512

1613
requirements:
1714
build:
1815
- {{ compiler('c') }}
16+
- {{ stdlib('c') }}
1917
host:
2018
- python
19+
- python-gil # [py>=314]
20+
- pip
2121
- setuptools >=77
2222
- mkl-devel
2323
- cython
2424
- numpy
25+
- wheel >=0.41.3
2526
run:
2627
- python
28+
- python-gil # [py>=314]
2729
- mkl-service
2830
- numpy
2931

@@ -36,11 +38,18 @@ test:
3638
imports:
3739
- mkl_fft
3840
- mkl_fft.interfaces
39-
- mkl_fft.interfaces.numpy_fft
40-
- mkl_fft.interfaces.scipy_fft
4141

4242
about:
4343
home: http://github.com/IntelPython/mkl_fft
4444
license: BSD-3-Clause
4545
license_file: LICENSE.txt
46-
summary: NumPy-based implementation of Fast Fourier Transform using Intel® oneAPI Math Kernel Library (OneMKL)
46+
summary: NumPy-based implementation of Fast Fourier Transform using Intel® oneAPI Math Kernel Library (oneMKL)
47+
description: |
48+
<strong>LEGAL NOTICE: Use of this software package is subject to the
49+
software license agreement (as set forth above, in the license section of
50+
the installed Conda package and/or the README file) and all notices,
51+
disclaimers or license terms for third party or open source software
52+
included in or with the software.</strong>
53+
<br/><br/>
54+
EULA: <a href="https://opensource.org/licenses/BSD-3-Clause" target="_blank">BSD-3-Clause</a>
55+
<br/><br/>

conda-recipe/conda_build_config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ c_stdlib_version: # [linux]
1111
c_stdlib: # [win]
1212
- vs # [win]
1313
cxx_compiler: # [win]
14-
- vs2017 # [win]
14+
- vs2022 # [win]
1515
c_compiler: # [win]
16-
- vs2017 # [win]
16+
- vs2022 # [win]

0 commit comments

Comments
 (0)