Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve pyproject.toml #1449

Merged
merged 1 commit into from
May 3, 2024
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
8 changes: 7 additions & 1 deletion conda-recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ for /f %%f in ('dir /b /S .\dist') do (

:: wheel file was renamed
for /f %%f in ('dir /b /S .\dist') do (
%PYTHON% -m pip install %%f
%PYTHON% -m pip install %%f ^
--no-build-isolation ^
--no-deps ^
--only-binary :all: ^
--no-index ^
--prefix %PREFIX% ^
-vv
if %ERRORLEVEL% neq 0 exit 1
)

Expand Down
8 changes: 7 additions & 1 deletion conda-recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ export PATH=$CONDA_PREFIX/bin-llvm:$PATH
${PYTHON} -m build -w -n -x
${PYTHON} -m wheel tags --remove --build "$GIT_DESCRIBE_NUMBER" \
--platform-tag manylinux2014_x86_64 dist/numba_dpex*.whl
${PYTHON} -m pip install dist/numba_dpex*.whl
${PYTHON} -m pip install dist/numba_dpex*.whl \
--no-build-isolation \
--no-deps \
--only-binary :all: \
--no-index \
--prefix "${PREFIX}" \
-vv

# Copy wheel package
if [[ -v WHEELS_OUTPUT_FOLDER ]]; then
Expand Down
36 changes: 20 additions & 16 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
{% set excluded_compiler_version2 = "2024.0.2" %}
{% set excluded_compiler_version3 = "2024.0.3" %}

{% set pyproject = load_file_data('pyproject.toml') %}
{% set py_build_deps = pyproject.get('build-system', {}).get('requires', []) %}

package:
name: numba-dpex
version: {{ GIT_DESCRIBE_TAG }}
Expand All @@ -25,31 +28,32 @@ requirements:
# does not have it in meta data
- sysroot_linux-64 >=2.28 # [linux]
host:
- python
- pip >=24.0
- dpcpp-cpp-rt >={{ required_compiler_version }},!={{ excluded_compiler_version1 }},!={{ excluded_compiler_version2 }},!={{ excluded_compiler_version3 }} # [win]
- dpcpp-cpp-rt >={{ required_compiler_version }},!={{ excluded_compiler_version1 }},!={{ excluded_compiler_version2 }} # [linux]
- python
# ensure we are using latest version of setuptools, since we don't need
# editable environments for release.
- setuptools >=69
- scikit-build >=0.17
- ninja >=1.11.1 # [not win]
- cmake >=3.29
- numba >=0.59
- llvmlite >=0.42.0
- dpctl >=0.16.1
- dpnp >=0.14
- numpy >=1.24
{% for dep in py_build_deps %}
{% if dep.startswith('ninja') %}
- {{ dep.split(';')[0] }} # [not win]
{% elif dep.startswith('cmake') %}
- {{ dep }}
{% elif dep.startswith('build>=') %}
- {{ 'python-' ~ dep }}
{% else %}
- {{ dep|replace('_','-') }}
{% endif %}
{% endfor %}
# versioneer dependency
- tomli # [py<311]
# TODO: temporary fix, because IGC is broken for output produced by llvm-spirv 2024.1 on windows
- dpcpp-llvm-spirv >={{ required_compiler_version }} # [not win]
- dpcpp-llvm-spirv >={{ required_compiler_version }},<2024.1 # [win]
- wheel >=0.43
- pip >=24.0
- python-build >=1.1
- versioneer==0.29
# versioneer dependency
- tomli # [py<311]
run:
- {{ pin_compatible('dpcpp-cpp-rt', min_pin='x.x', max_pin='x') }}
- {{ pin_compatible('intel-cmplr-lib-rt', min_pin='x.x', max_pin='x') }}
- {{ pin_compatible('dpcpp-llvm-spirv', min_pin='x.x', max_pin='x') }}
# TODO: temporary fix, because IGC is broken for output produced by llvm-spirv 2024.1 on windows
- {{ pin_compatible('dpcpp-llvm-spirv', min_pin='x.x', max_pin='x') }} # [not win]
- {{ pin_compatible('dpcpp-llvm-spirv', min_pin='x.x', max_pin='x', upper_bound='2024.1') }} # [win]
Expand Down
17 changes: 13 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = [
# TODO: keep in sync with [project.dependencies] and /conda-recipe/meta.yaml
# TODO: keep in sync with [project.dependencies]
"wheel>=0.43",
"build>=1.1",
"setuptools>=63.0.0",
"scikit-build>=0.17.0",
"ninja>=1.11.1; platform_system!='Windows'",
"cmake>=3.29.0",
"numba>=0.59.0",
# We need dpctl for UsmNdArray integration for dpcpp code
"dpctl>=0.16.1",
"numpy>=1.24.0",
"wheel",
# We need numba for runtime cpp headers
"numba>=0.59.0",
"llvmlite>=0.42.0",
# Do we need dpnp at build time?
"dpnp >=0.14",
"numpy >=1.24",
# WARNING: check with doc how to upgrade
"versioneer[toml]==0.29"
]
Expand All @@ -34,6 +40,9 @@ dependencies = [
# This restrictions are for dependabot, actual restrictions are set with
# conda.
# TODO: populate it during build process
# TODO: do we have to set sycl runtime dependencies here
# "dpcpp-cpp-rt>=0.59.0",
# "intel-cmplr-lib-rt>=0.59.0"
"numba>=0.59.0",
"llvmlite>=0.42.0",
"dpctl>=0.16.1",
Expand Down
Loading