Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Align wheels build logic with internal CI
  • Loading branch information
ekomarova committed Aug 13, 2025
commit 0a83a40505cf67b77fe44bd889b17b4c23883911
14 changes: 12 additions & 2 deletions conda-recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
@rem Remember to source the compiler

set MKLROOT=%CONDA_PREFIX%
%PYTHON% -m pip install --no-build-isolation --no-deps .
if errorlevel 1 exit 1

rem Build wheel package
if NOT "%WHEELS_OUTPUT_FOLDER%"=="" (
%PYTHON% -m pip wheel --no-build-isolation --no-deps .
if errorlevel 1 exit 1
copy mkl_random*.whl %WHEELS_OUTPUT_FOLDER%
if errorlevel 1 exit 1
) ELSE (
rem Build conda package
%PYTHON% -m pip install --no-build-isolation --no-deps .
if errorlevel 1 exit 1
)
15 changes: 14 additions & 1 deletion conda-recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
#!/bin/bash -x

export CFLAGS="-I$PREFIX/include $CFLAGS"
export LDFLAGS="-Wl,-rpath,\$ORIGIN/../.. -Wl,-rpath,\$ORIGIN/../../.. -L${PREFIX}/lib ${LDFLAGS}"
export MKLROOT=$CONDA_PREFIX
$PYTHON -m pip install --no-build-isolation --no-deps .

read -r GLIBC_MAJOR GLIBC_MINOR <<<"$(conda list '^sysroot_linux-64$' \
| tail -n 1 | awk '{print $2}' | grep -oP '\d+' | head -n 2 | tr '\n' ' ')"

# Build wheel package
if [ -n "${WHEELS_OUTPUT_FOLDER}" ]; then
$PYTHON -m pip wheel --no-build-isolation --no-deps .
${PYTHON} -m wheel tags --remove --platform-tag "manylinux_${GLIBC_MAJOR}_${GLIBC_MINOR}_x86_64" mkl_random*.whl
cp mkl_random*.whl ${WHEELS_OUTPUT_FOLDER}
else
# Build conda package
$PYTHON -m pip install --no-build-isolation --no-deps .
fi
16 changes: 16 additions & 0 deletions conda-recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
c_compiler: # [linux]
- gcc # [linux]
cxx_compiler: # [linux]
- gxx # [linux]
cxx_compiler_version: # [linux]
- '14' # [linux]
c_stdlib: # [linux]
- sysroot # [linux]
c_stdlib_version: # [linux]
- '2.28' # [linux]
c_stdlib: # [win]
- vs # [win]
cxx_compiler: # [win]
- vs2022 # [win]
c_compiler: # [win]
- vs2022 # [win]
3 changes: 3 additions & 0 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ source:

build:
number: {{buildnumber}}
script_env:
- WHEELS_OUTPUT_FOLDER
ignore_run_exports:
- blas

Expand All @@ -24,6 +26,7 @@ requirements:
- cython
- numpy-base
- pip
- wheel >=0.41.3
run:
- python
- {{ pin_compatible('mkl', min_pin="x.x", max_pin="x") }}
Expand Down