From 9710355b988cb152a98ad4b8ceebe8e8fa5e6437 Mon Sep 17 00:00:00 2001 From: Vyacheslav Smirnov Date: Mon, 16 Nov 2020 16:04:57 +0300 Subject: [PATCH 1/3] Add wheels build --- conda-recipe/bld.bat | 4 +++- conda-recipe/build.sh | 5 ++++- conda-recipe/meta.yaml | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/conda-recipe/bld.bat b/conda-recipe/bld.bat index a44c3dabb0..7482a7b35a 100644 --- a/conda-recipe/bld.bat +++ b/conda-recipe/bld.bat @@ -45,5 +45,7 @@ set "DPPL_SYCL_INTERFACE_LIBDIR=dpctl" set "DPPL_SYCL_INTERFACE_INCLDIR=dpctl\include" "%PYTHON%" setup.py clean --all -"%PYTHON%" setup.py build install +"%PYTHON%" setup.py build install bdist_wheel IF %ERRORLEVEL% NEQ 0 exit 1 +if NOT "%WHEELS_OUTPUT_FOLDER%"=="" copy dist\dpctl*.whl %WHEELS_OUTPUT_FOLDER% +if errorlevel 1 exit 1 diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index 72c28d711d..4722e07bc7 100755 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -55,4 +55,7 @@ export DPPL_SYCL_INTERFACE_INCLDIR=dpctl/include export CFLAGS="-fPIC -O3 ${CFLAGS}" export LDFLAGS="-L ${OpenCL_LIBDIR} ${LDFLAGS}" ${PYTHON} setup.py clean --all -${PYTHON} setup.py build install +${PYTHON} setup.py build install bdist_wheel -p manylinux1_x86_64 +if [ -n "${WHEELS_OUTPUT_FOLDER}" ]; then + cp dist/dpctl*.whl ${WHEELS_OUTPUT_FOLDER} +fi diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index f48cccc14f..48218fb22b 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -11,6 +11,7 @@ build: number: {{ GIT_DESCRIBE_NUMBER }} script_env: - ONEAPI_ROOT + - WHEELS_OUTPUT_FOLDER requirements: build: From 71758f886f6a7aae0bd2931d3f1c0b16b4d6d433 Mon Sep 17 00:00:00 2001 From: Vyacheslav Smirnov Date: Tue, 17 Nov 2020 14:13:11 +0300 Subject: [PATCH 2/3] Change build format --- conda-recipe/bld.bat | 12 +++++++++--- conda-recipe/build.sh | 5 ++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/conda-recipe/bld.bat b/conda-recipe/bld.bat index 7482a7b35a..41f0bb66de 100644 --- a/conda-recipe/bld.bat +++ b/conda-recipe/bld.bat @@ -45,7 +45,13 @@ set "DPPL_SYCL_INTERFACE_LIBDIR=dpctl" set "DPPL_SYCL_INTERFACE_INCLDIR=dpctl\include" "%PYTHON%" setup.py clean --all -"%PYTHON%" setup.py build install bdist_wheel +"%PYTHON%" setup.py build install IF %ERRORLEVEL% NEQ 0 exit 1 -if NOT "%WHEELS_OUTPUT_FOLDER%"=="" copy dist\dpctl*.whl %WHEELS_OUTPUT_FOLDER% -if errorlevel 1 exit 1 + +rem Build wheel package +if NOT "%WHEELS_OUTPUT_FOLDER%"=="" ( + %PYTHON% setup.py bdist_wheel + if errorlevel 1 exit 1 + copy dist\dpctl*.whl %WHEELS_OUTPUT_FOLDER% + if errorlevel 1 exit 1 +) diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index 4722e07bc7..97ef2bfc56 100755 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -55,7 +55,10 @@ export DPPL_SYCL_INTERFACE_INCLDIR=dpctl/include export CFLAGS="-fPIC -O3 ${CFLAGS}" export LDFLAGS="-L ${OpenCL_LIBDIR} ${LDFLAGS}" ${PYTHON} setup.py clean --all -${PYTHON} setup.py build install bdist_wheel -p manylinux1_x86_64 +${PYTHON} setup.py build install + +# Build wheel package if [ -n "${WHEELS_OUTPUT_FOLDER}" ]; then + $PYTHON setup.py bdist_wheel -p manylinux1_x86_64 cp dist/dpctl*.whl ${WHEELS_OUTPUT_FOLDER} fi From 824837d7a57adf36dc3b9dfb984f2977bd3d8874 Mon Sep 17 00:00:00 2001 From: Vyacheslav Smirnov Date: Tue, 17 Nov 2020 19:17:42 +0300 Subject: [PATCH 3/3] Add wheel to host requirements --- conda-recipe/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 48218fb22b..7245a849a0 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -25,6 +25,7 @@ requirements: - make # [unix] - ninja # [win] - numpy >=1.17 + - wheel run: - python - numpy >=1.17