Skip to content
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
19 changes: 9 additions & 10 deletions conda-recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/bash

# We need dpcpp to compile dpctl_sycl_interface
if [ ! -z "${ONEAPI_ROOT}" ]; then
# Suppress error b/c it could fail on Ubuntu 18.04
source ${ONEAPI_ROOT}/compiler/latest/env/vars.sh || true
else
echo "DPCPP is needed to build DPCTL. Abort!"
exit 1
fi

${PYTHON} setup.py clean --all
${PYTHON} setup.py install
${PYTHON} setup.py install --sycl-compiler-prefix=$CONDA_PREFIX

# Build wheel package
if [ "$CONDA_PY" == "36" ]; then
Expand All @@ -19,6 +10,14 @@ else
WHEELS_BUILD_ARGS="-p manylinux2014_x86_64"
fi
if [ -n "${WHEELS_OUTPUT_FOLDER}" ]; then
# We need dpcpp to compile dpctl_sycl_interface
if [ ! -z "${ONEAPI_ROOT}" ]; then
# Suppress error b/c it could fail on Ubuntu 18.04
source ${ONEAPI_ROOT}/compiler/latest/env/vars.sh || true
else
echo "DPCPP is needed to build DPCTL. Abort!"
exit 1
fi
$PYTHON setup.py bdist_wheel ${WHEELS_BUILD_ARGS}
cp dist/dpctl*.whl ${WHEELS_OUTPUT_FOLDER}
fi
7 changes: 3 additions & 4 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{% set name = "dpctl" %}

package:
name: {{ name|lower }}
name: dpctl
version: {{ GIT_DESCRIBE_TAG }}

source:
Expand All @@ -10,12 +8,13 @@ source:
build:
number: {{ GIT_DESCRIBE_NUMBER }}
script_env:
- ONEAPI_ROOT
- ONEAPI_ROOT # for wheel on Linux
- WHEELS_OUTPUT_FOLDER

requirements:
build:
- {{ compiler('cxx') }}
- {{ compiler('dpcpp') }} # [linux]
host:
- setuptools
- cython
Expand Down