Skip to content

Commit c8cc2ea

Browse files
authored
Merge pull request #74 from IntelPython/add_wheels_build
Align wheels build logic with internal CI
2 parents 2c966e8 + 8cb83f8 commit c8cc2ea

File tree

4 files changed

+55
-3
lines changed

4 files changed

+55
-3
lines changed

conda-recipe/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/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

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

conda-recipe/meta.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +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') }}
1921
- {{ compiler('cxx') }}
22+
- {{ stdlib('c') }}
2023
host:
2124
- python
2225
- setuptools >=77
2326
- mkl-devel
2427
- cython
2528
- numpy-base
2629
- pip
30+
- wheel >=0.41.3
2731
run:
2832
- python
2933
- {{ pin_compatible('mkl', min_pin="x.x", max_pin="x") }}
@@ -43,3 +47,12 @@ about:
4347
license: BSD-3-Clause
4448
license_file: LICENSE.txt
4549
summary: NumPy-based implementation of random number generation sampling using Intel (R) Math Kernel Library, mirroring numpy.random, but exposing all choices of sampling algorithms available in MKL.
50+
description: |
51+
<strong>LEGAL NOTICE: Use of this software package is subject to the
52+
software license agreement (as set forth above, in the license section of
53+
the installed Conda package and/or the README file) and all notices,
54+
disclaimers or license terms for third party or open source software
55+
included in or with the software.</strong>
56+
<br/><br/>
57+
EULA: <a href="https://opensource.org/licenses/BSD-3-Clause" target="_blank">BSD-3-Clause</a>
58+
<br/><br/>

0 commit comments

Comments
 (0)