Skip to content

Commit fe21682

Browse files
authored
Replace setup.py bdist_wheel with python -m build --wheel (#5310)
Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 203089f commit fe21682

File tree

7 files changed

+13
-10
lines changed

7 files changed

+13
-10
lines changed

.github/workflows/build-test-reusable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ jobs:
130130
use_spirv_backend: ${{ inputs.use_spirv_backend }}
131131
command: >
132132
DEBUG=1
133-
python setup.py bdist_wheel && pip install dist/*.whl
133+
python -m build --wheel --no-isolation && pip install dist/*.whl
134134
135135
- name: Set test-triton command line
136136
id: test-triton

.github/workflows/e2e-reusable.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
run: |
9090
# cmake 3.22.1 does not work with the recent torchaudio: https://github.com/intel/intel-xpu-backend-for-triton/issues/2079
9191
# cmake<4.0.0 is required as a workaround for CMake Error at third_party/double-conversion/CMakeLists.txt:1 (cmake_minimum_required)
92-
pip install wheel 'cmake<4.0.0'
92+
pip install wheel 'cmake<4.0.0' build
9393
9494
- name: Setup PyTorch
9595
id: setup-pytorch
@@ -122,7 +122,7 @@ jobs:
122122
if: ${{ steps.triton-cache.outputs.status == 'miss' }}
123123
uses: ./.github/actions/setup-triton
124124
with:
125-
command: DEBUG=1 python setup.py bdist_wheel
125+
command: DEBUG=1 python -m build --wheel --no-isolation
126126

127127
- name: Install Triton
128128
run: |

.github/workflows/nightly-wheels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
- name: Install Python build dependencies
5555
run: |
5656
# cmake 3.22.1 does not work with the recent torchaudio: https://github.com/intel/intel-xpu-backend-for-triton/issues/2079
57-
pip install wheel cmake
57+
pip install wheel cmake build
5858
5959
- name: Setup PyTorch
6060
id: setup-pytorch
@@ -76,7 +76,7 @@ jobs:
7676
with:
7777
command: >
7878
DEBUG=1
79-
python setup.py bdist_wheel && pip install dist/*.whl
79+
python -m build --wheel --no-isolation && pip install dist/*.whl
8080
8181
- name: Install torchvision package
8282
uses: ./.github/actions/install-dependency

.github/workflows/pip-test-windows.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@ jobs:
9090
.venv\Scripts\activate.ps1
9191
Invoke-BatchFile "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
9292
cd ${{ env.NEW_WORKSPACE }}
93-
pip install -U wheel pybind11 cmake intel-sycl-rt==2025.2.1
94-
python setup.py -v bdist_wheel
93+
pip install -U wheel pybind11 'cmake>=3.20,<4.0' intel-sycl-rt==2025.2.1 build
94+
# `build` can't determine that Ninja is already installed.
95+
# similar issue: https://github.com/pypa/build/issues/506
96+
python -m build --wheel --no-isolation --skip-dependency-check
9597
pip install (Get-Item ${{ env.NEW_WORKSPACE }}\dist\*.whl)
9698
9799
- name: Triton version

.github/workflows/third-party-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
- name: Build Triton wheels
7575
uses: ./.github/actions/setup-triton
7676
with:
77-
command: DEBUG=1 python setup.py bdist_wheel
77+
command: DEBUG=1 python -m build --wheel --no-isolation
7878

7979
- name: Install Triton
8080
id: install

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools>=70.2.0", "cmake>=3.20,<4.0", "ninja==1.11.1.4", "pybind11>=2.13.1"]
2+
requires = ["setuptools>=70.2.0", "cmake>=3.20,<4.0", "ninja<1.13.0", "pybind11>=2.13.1"]
33
build-backend = "setuptools.build_meta"
44

55
[tool.mypy]

python/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
setuptools>=70.2.0
22
wheel
3+
build
34
cmake>=3.20,<4.0
4-
ninja>=1.11.1
5+
ninja<1.13.0
56
pybind11>=2.13.1
67
lit

0 commit comments

Comments
 (0)