Skip to content

Commit 032c348

Browse files
committed
Align wheels build logic with internal CI
1 parent 6981ec1 commit 032c348

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

conda-recipe/bld.bat

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

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 ${WHEELS_BUILD_TAG} 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/meta.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ source:
1010

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

0 commit comments

Comments
 (0)