Skip to content

Commit

Permalink
Use ninja
Browse files Browse the repository at this point in the history
  • Loading branch information
ZzEeKkAa committed Aug 30, 2023
1 parent 9c85f0e commit 45560c2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
7 changes: 5 additions & 2 deletions conda-recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
@REM used BUILD_PREFIX as compiler installed in build section of meta.yml
set "PATH=%BUILD_PREFIX%\Library\bin-llvm;%PATH%"

%PYTHON% setup.py install --single-version-externally-managed --record=record.txt
set "SKBUILD_ARGS=-G Ninja --"
set "SKBUILD_ARGS=%SKBUILD_ARGS% -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"

%PYTHON% setup.py install --single-version-externally-managed --record=record.txt %SKBUILD_ARGS%

rem Build wheel package
if NOT "%WHEELS_OUTPUT_FOLDER%"=="" (
%PYTHON% setup.py bdist_wheel
%PYTHON% setup.py bdist_wheel %SKBUILD_ARGS%
if errorlevel 1 exit 1
copy dist\numba_dpex*.whl %WHEELS_OUTPUT_FOLDER%
if errorlevel 1 exit 1
Expand Down
6 changes: 4 additions & 2 deletions conda-recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ set -euxo pipefail
# starting from dpcpp_impl_linux-64=2022.0.0=intel_3610
export PATH=$CONDA_PREFIX/bin-llvm:$PATH

${PYTHON} setup.py install --single-version-externally-managed --record=record.txt
SKBUILD_ARGS="-G Ninja -- -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"

${PYTHON} setup.py install --single-version-externally-managed --record=record.txt ${SKBUILD_ARGS}

# Build wheel package
if [ "$CONDA_PY" == "36" ]; then
Expand All @@ -15,6 +17,6 @@ else
WHEELS_BUILD_ARGS=(-p manylinux2014_x86_64)
fi
if [[ -v WHEELS_OUTPUT_FOLDER ]]; then
$PYTHON setup.py bdist_wheel "${WHEELS_BUILD_ARGS[@]}"
$PYTHON setup.py bdist_wheel "${WHEELS_BUILD_ARGS[@]}" ${SKBUILD_ARGS}
cp dist/numba_dpex*.whl "${WHEELS_OUTPUT_FOLDER[@]}"
fi
3 changes: 3 additions & 0 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ requirements:
- python
- setuptools >=63.*
- scikit-build >=0.15*
- ninja # [not win]
- cython
- pybind11
- cmake >=3.26*
- numba >=0.57*
- dpctl >=0.14*
Expand Down

0 comments on commit 45560c2

Please sign in to comment.