diff --git a/conda-recipe/bld.bat b/conda-recipe/bld.bat index 7e846e8537..9846722302 100644 --- a/conda-recipe/bld.bat +++ b/conda-recipe/bld.bat @@ -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 ) diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index da13f3f8bf..d1e0783b3b 100644 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -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 diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 8db61810fc..518cc2e7e5 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -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 }} @@ -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] diff --git a/pyproject.toml b/pyproject.toml index e44e25b640..7b447fdf87 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" ] @@ -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",