Skip to content

Align wheels build logic with internal CI #213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 12 additions & 2 deletions conda-recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
set MKLROOT=%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_fft*.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
Expand Up @@ -2,4 +2,17 @@

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

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_fft*.whl
cp mkl_fft*.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]
- vs2017 # [win]
c_compiler: # [win]
- vs2017 # [win]
5 changes: 5 additions & 0 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,24 @@ source:

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

requirements:
build:
- {{ compiler('c') }}
- {{ stdlib('c') }}
host:
- python
- pip
- setuptools >=77
- mkl-devel
- mkl-devel 2024.2.* # [py==39]
- cython
- numpy-base
- wheel >=0.41.3
run:
- python
- mkl-service
Expand Down
Loading