Skip to content

Commit 048b1f1

Browse files
ZzEeKkAaDiptorup Deb
authored andcommitted
Improve pyproject.toml
1 parent 50cd1c5 commit 048b1f1

File tree

4 files changed

+47
-22
lines changed

4 files changed

+47
-22
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: 20 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,32 @@ 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
35+
# ensure we are using latest version of setuptools, since we don't need
36+
# editable environments for release.
3137
- 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
38+
{% for dep in py_build_deps %}
39+
{% if dep.startswith('ninja') %}
40+
- {{ dep.split(';')[0] }} # [not win]
41+
{% elif dep.startswith('cmake') %}
42+
- {{ dep }}
43+
{% elif dep.startswith('build>=') %}
44+
- {{ 'python-' ~ dep }}
45+
{% else %}
46+
- {{ dep|replace('_','-') }}
47+
{% endif %}
48+
{% endfor %}
49+
# versioneer dependency
50+
- tomli # [py<311]
4051
# TODO: temporary fix, because IGC is broken for output produced by llvm-spirv 2024.1 on windows
4152
- dpcpp-llvm-spirv >={{ required_compiler_version }} # [not win]
4253
- 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]
4954
run:
5055
- {{ pin_compatible('dpcpp-cpp-rt', min_pin='x.x', max_pin='x') }}
5156
- {{ 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') }}
5357
# TODO: temporary fix, because IGC is broken for output produced by llvm-spirv 2024.1 on windows
5458
- {{ pin_compatible('dpcpp-llvm-spirv', min_pin='x.x', max_pin='x') }} # [not win]
5559
- {{ pin_compatible('dpcpp-llvm-spirv', min_pin='x.x', max_pin='x', upper_bound='2024.1') }} # [win]

pyproject.toml

Lines changed: 13 additions & 4 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
]
@@ -34,6 +40,9 @@ dependencies = [
3440
# This restrictions are for dependabot, actual restrictions are set with
3541
# conda.
3642
# TODO: populate it during build process
43+
# TODO: do we have to set sycl runtime dependencies here
44+
# "dpcpp-cpp-rt>=0.59.0",
45+
# "intel-cmplr-lib-rt>=0.59.0"
3746
"numba>=0.59.0",
3847
"llvmlite>=0.42.0",
3948
"dpctl>=0.16.1",

0 commit comments

Comments
 (0)