Skip to content

Commit 6ac5bb3

Browse files
authored
Align wheels build logic with internal CI (#213)
* This PR adds the use of WHEELS_OUTPUT_FOLDER variable
1 parent 6981ec1 commit 6ac5bb3

File tree

4 files changed

+47
-3
lines changed

4 files changed

+47
-3
lines changed

conda-recipe/bld.bat

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
set MKLROOT=%PREFIX%
2-
%PYTHON% -m pip install --no-build-isolation --no-deps .
3-
if errorlevel 1 exit 1
2+
3+
rem Build wheel package
4+
if NOT "%WHEELS_OUTPUT_FOLDER%"=="" (
5+
%PYTHON% -m pip wheel --no-build-isolation --no-deps .
6+
if errorlevel 1 exit 1
7+
copy mkl_fft*.whl %WHEELS_OUTPUT_FOLDER%
8+
if errorlevel 1 exit 1
9+
) ELSE (
10+
rem Build conda package
11+
%PYTHON% -m pip install --no-build-isolation --no-deps .
12+
if errorlevel 1 exit 1
13+
)

conda-recipe/build.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,17 @@
22

33
export MKLROOT=$PREFIX
44
export CFLAGS="-I$PREFIX/include $CFLAGS"
5-
$PYTHON -m pip install --no-build-isolation --no-deps .
5+
export LDFLAGS="-Wl,-rpath,\$ORIGIN/../.. -Wl,-rpath,\$ORIGIN/../../.. -L${PREFIX}/lib ${LDFLAGS}"
6+
7+
read -r GLIBC_MAJOR GLIBC_MINOR <<<"$(conda list '^sysroot_linux-64$' \
8+
| tail -n 1 | awk '{print $2}' | grep -oP '\d+' | head -n 2 | tr '\n' ' ')"
9+
10+
# Build wheel package
11+
if [ -n "${WHEELS_OUTPUT_FOLDER}" ]; then
12+
$PYTHON -m pip wheel --no-build-isolation --no-deps .
13+
${PYTHON} -m wheel tags --remove --platform-tag "manylinux_${GLIBC_MAJOR}_${GLIBC_MINOR}_x86_64" mkl_fft*.whl
14+
cp mkl_fft*.whl "${WHEELS_OUTPUT_FOLDER}"
15+
else
16+
# Build conda package
17+
$PYTHON -m pip install --no-build-isolation --no-deps .
18+
fi

conda-recipe/conda_build_config.yaml

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+
- vs2017 # [win]
15+
c_compiler: # [win]
16+
- vs2017 # [win]

conda-recipe/meta.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,24 @@ source:
1010

1111
build:
1212
number: {{ buildnumber }}
13+
script_env:
14+
- WHEELS_OUTPUT_FOLDER
1315
ignore_run_exports:
1416
- blas
1517

1618
requirements:
1719
build:
1820
- {{ compiler('c') }}
21+
- {{ stdlib('c') }}
1922
host:
2023
- python
24+
- pip
2125
- setuptools >=77
2226
- mkl-devel
2327
- mkl-devel 2024.2.* # [py==39]
2428
- cython
2529
- numpy-base
30+
- wheel >=0.41.3
2631
run:
2732
- python
2833
- mkl-service

0 commit comments

Comments
 (0)