Skip to content

Commit 59d33e7

Browse files
committed
Improve pyproject.toml
1 parent c1b8a59 commit 59d33e7

File tree

4 files changed

+46
-23
lines changed

4 files changed

+46
-23
lines changed

conda-recipe/bld.bat

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@ for /f %%f in ('dir /b /S .\dist') do (
3535

3636
:: wheel file was renamed
3737
for /f %%f in ('dir /b /S .\dist') do (
38-
%PYTHON% -m pip install %%f
38+
%PYTHON% -m pip install %%f ^
39+
--no-build-isolation ^
40+
--no-deps ^
41+
--only-binary :all: ^
42+
--no-index ^
43+
--prefix %PREFIX% ^
44+
-vv
3945
if %ERRORLEVEL% neq 0 exit 1
4046
)
4147

conda-recipe/build.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ export PATH=$CONDA_PREFIX/bin-llvm:$PATH
2727
${PYTHON} -m build -w -n -x
2828
${PYTHON} -m wheel tags --remove --build "$GIT_DESCRIBE_NUMBER" \
2929
--platform-tag manylinux2014_x86_64 dist/numba_dpex*.whl
30-
${PYTHON} -m pip install dist/numba_dpex*.whl
30+
${PYTHON} -m pip install dist/numba_dpex*.whl \
31+
--no-build-isolation \
32+
--no-deps \
33+
--only-binary :all: \
34+
--no-index \
35+
--prefix "${PREFIX}" \
36+
-vv
3137

3238
# Copy wheel package
3339
if [[ -v WHEELS_OUTPUT_FOLDER ]]; then

conda-recipe/meta.yaml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
{% set excluded_compiler_version2 = "2024.0.2" %}
44
{% set excluded_compiler_version3 = "2024.0.3" %}
55

6+
{% set pyproject = load_file_data('pyproject.toml') %}
7+
{% set py_build_deps = pyproject.get('build-system', {}).get('requires', []) %}
8+
69
package:
710
name: numba-dpex
811
version: {{ GIT_DESCRIBE_TAG }}
@@ -25,31 +28,30 @@ requirements:
2528
# does not have it in meta data
2629
- sysroot_linux-64 >=2.28 # [linux]
2730
host:
31+
- python
32+
- pip >=24.0
2833
- dpcpp-cpp-rt >={{ required_compiler_version }},!={{ excluded_compiler_version1 }},!={{ excluded_compiler_version2 }},!={{ excluded_compiler_version3 }} # [win]
2934
- dpcpp-cpp-rt >={{ required_compiler_version }},!={{ excluded_compiler_version1 }},!={{ excluded_compiler_version2 }} # [linux]
30-
- python
3135
- setuptools >=69
32-
- scikit-build >=0.17
33-
- ninja >=1.11.1 # [not win]
34-
- cmake >=3.29
35-
- numba >=0.59
36-
- llvmlite >=0.42.0
37-
- dpctl >=0.16.1
38-
- dpnp >=0.14
39-
- numpy >=1.24
36+
{% for dep in py_build_deps %}
37+
{% if dep.startswith('ninja') %}
38+
- {{ dep.split(';')[0] }} # [not win]
39+
{% elif dep.startswith('cmake') %}
40+
- {{ dep }}
41+
{% elif dep.startswith('build>=') %}
42+
- {{ 'python-' ~ dep }}
43+
{% else %}
44+
- {{ dep|replace('_','-') }}
45+
{% endif %}
46+
{% endfor %}
47+
# versioneer dependency
48+
- tomli # [py<311]
4049
# TODO: temporary fix, because IGC is broken for output produced by llvm-spirv 2024.1 on windows
4150
- dpcpp-llvm-spirv >={{ required_compiler_version }} # [not win]
4251
- dpcpp-llvm-spirv >={{ required_compiler_version }},<2024.1 # [win]
43-
- wheel >=0.43
44-
- pip >=24.0
45-
- python-build >=1.1
46-
- versioneer==0.29
47-
# versioneer dependency
48-
- tomli # [py<311]
4952
run:
5053
- {{ pin_compatible('dpcpp-cpp-rt', min_pin='x.x', max_pin='x') }}
5154
- {{ pin_compatible('intel-cmplr-lib-rt', min_pin='x.x', max_pin='x') }}
52-
- {{ pin_compatible('dpcpp-llvm-spirv', min_pin='x.x', max_pin='x') }}
5355
# TODO: temporary fix, because IGC is broken for output produced by llvm-spirv 2024.1 on windows
5456
- {{ pin_compatible('dpcpp-llvm-spirv', min_pin='x.x', max_pin='x') }} # [not win]
5557
- {{ pin_compatible('dpcpp-llvm-spirv', min_pin='x.x', max_pin='x', upper_bound='2024.1') }} # [win]

pyproject.toml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
[build-system]
22
build-backend = "setuptools.build_meta"
33
requires = [
4-
# TODO: keep in sync with [project.dependencies] and /conda-recipe/meta.yaml
4+
# TODO: keep in sync with [project.dependencies]
5+
"wheel>=0.43",
6+
"build>=1.1",
57
"setuptools>=63.0.0",
68
"scikit-build>=0.17.0",
79
"ninja>=1.11.1; platform_system!='Windows'",
810
"cmake>=3.29.0",
9-
"numba>=0.59.0",
11+
# We need dpctl for UsmNdArray integration for dpcpp code
1012
"dpctl>=0.16.1",
11-
"numpy>=1.24.0",
12-
"wheel",
13+
# We need numba for runtime cpp headers
14+
"numba>=0.59.0",
15+
"llvmlite>=0.42.0",
16+
# Do we need dpnp at build time?
17+
"dpnp >=0.14",
18+
"numpy >=1.24",
1319
# WARNING: check with doc how to upgrade
1420
"versioneer[toml]==0.29"
1521
]
@@ -39,7 +45,10 @@ dependencies = [
3945
"dpctl>=0.16.1",
4046
"dpnp>=0.14.0",
4147
"numpy>=1.24.0",
42-
"dpcpp_llvm_spirv>=2024.0"
48+
"dpcpp_llvm_spirv>=2024.0",
49+
# Sycl runtime dependencies
50+
"dpcpp-cpp-rt>=0.59.0",
51+
"intel-cmplr-lib-rt>=0.59.0"
4352
]
4453
description = "An extension for Numba to add data-parallel offload capability"
4554
dynamic = ["version"]

0 commit comments

Comments
 (0)