Skip to content

Commit 1dc22d1

Browse files
committed
align conda-forge recipe build scripts to original recipe
1 parent 997ce12 commit 1dc22d1

2 files changed

Lines changed: 26 additions & 3 deletions

File tree

conda-recipe-cf/bld.bat

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
@rem Remember to source the compiler
22

33
set MKLROOT=%CONDA_PREFIX%
4-
%PYTHON% -m pip install --no-build-isolation --no-deps .
5-
if errorlevel 1 exit 1
4+
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_random*.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-cf/build.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
#!/bin/bash -x
22

33
export CFLAGS="-I$PREFIX/include $CFLAGS"
4+
export LDFLAGS="-Wl,-rpath,\$ORIGIN/../.. -Wl,-rpath,\$ORIGIN/../../.. -L${PREFIX}/lib ${LDFLAGS}"
45
export MKLROOT=$CONDA_PREFIX
5-
$PYTHON -m pip install --no-build-isolation --no-deps .
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_random*.whl
14+
cp mkl_random*.whl "${WHEELS_OUTPUT_FOLDER}"
15+
else
16+
# Build conda package
17+
$PYTHON -m pip install --no-build-isolation --no-deps .
18+
fi

0 commit comments

Comments
 (0)