From b4999988dabb97f8f858ca3132db46b15cedf80e Mon Sep 17 00:00:00 2001 From: Maksim Levental Date: Sun, 22 Jun 2025 20:59:11 -0400 Subject: [PATCH 1/7] Update release.yml --- .github/workflows/release.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ab3f274..d24a08f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -94,9 +94,11 @@ jobs: - name: Build wheel shell: bash run: | - - pip install mlir-python-bindings==$BINDINGS_VERSION -t tmp - cp -R tmp/mlir $PWD + + if [ "$USE_LOCAL_VERSION" == "1" ]; then + pip install mlir-python-bindings==$BINDINGS_VERSION -t tmp + cp -R tmp/mlir $PWD + fi pip wheel . -v -w wheelhouse - name: auditwheel From 191f2b71fac78f434853c71ab3c68c77080dd588 Mon Sep 17 00:00:00 2001 From: Maksim Levental Date: Sun, 22 Jun 2025 21:00:11 -0400 Subject: [PATCH 2/7] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d24a08f..5067536 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -95,7 +95,7 @@ jobs: shell: bash run: | - if [ "$USE_LOCAL_VERSION" == "1" ]; then + if [ "$BUNDLE_MLIR_PYTHON_BINDINGS" == "1" ]; then pip install mlir-python-bindings==$BINDINGS_VERSION -t tmp cp -R tmp/mlir $PWD fi From 06c3adca9293ff5739ef8bfb2200050888491888 Mon Sep 17 00:00:00 2001 From: Maksim Levental Date: Sun, 22 Jun 2025 21:03:24 -0400 Subject: [PATCH 3/7] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5067536..880b418 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -102,7 +102,7 @@ jobs: pip wheel . -v -w wheelhouse - name: auditwheel - if: startsWith(matrix.os, 'ubuntu') + if: startsWith(matrix.os, 'ubuntu') && ${{ env.BUNDLE_MLIR_PYTHON_BINDINGS == '1' }} shell: bash run: | From 70fade3b329757bd4a6f18a467f7259793524695 Mon Sep 17 00:00:00 2001 From: Maksim Levental Date: Sun, 22 Jun 2025 21:11:48 -0400 Subject: [PATCH 4/7] Update release.yml --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 880b418..b6bce1f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,11 +5,11 @@ on: inputs: USE_LOCAL_VERSION: description: 'use local version for wheel' - type: number + type: string default: 1 BUNDLE_MLIR_PYTHON_BINDINGS: description: 'bundle mlir python bindings' - type: number + type: string default: 1 release: types: @@ -102,7 +102,7 @@ jobs: pip wheel . -v -w wheelhouse - name: auditwheel - if: startsWith(matrix.os, 'ubuntu') && ${{ env.BUNDLE_MLIR_PYTHON_BINDINGS == '1' }} + if: (startsWith(matrix.os, 'ubuntu') && ${{ env.BUNDLE_MLIR_PYTHON_BINDINGS == '1' }}) shell: bash run: | From cdad1078bc9e5fcb395a825b8f5223a74a283233 Mon Sep 17 00:00:00 2001 From: Maksim Levental Date: Sun, 22 Jun 2025 21:15:52 -0400 Subject: [PATCH 5/7] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b6bce1f..9fd63ec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -102,7 +102,7 @@ jobs: pip wheel . -v -w wheelhouse - name: auditwheel - if: (startsWith(matrix.os, 'ubuntu') && ${{ env.BUNDLE_MLIR_PYTHON_BINDINGS == '1' }}) + if: (startsWith(matrix.os, 'ubuntu') && env.BUNDLE_MLIR_PYTHON_BINDINGS == '1') shell: bash run: | From eeaa12d7fb887c73fb00d8d5b1fcb544e0a4983b Mon Sep 17 00:00:00 2001 From: Maksim Levental Date: Sun, 22 Jun 2025 22:00:37 -0400 Subject: [PATCH 6/7] Update util.py --- mlir/extras/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlir/extras/util.py b/mlir/extras/util.py index 06dc2c0..2eceade 100644 --- a/mlir/extras/util.py +++ b/mlir/extras/util.py @@ -84,7 +84,7 @@ def enable_debug(): def shlib_ext(): if platform.system() == "Darwin": shlib_ext = "dylib" - elif platform.system() == "Linux": + elif platform.system() == {"Linux", "Emscripten"}: shlib_ext = "so" elif platform.system() == "Windows": shlib_ext = "lib" @@ -95,7 +95,7 @@ def shlib_ext(): def shlib_prefix(): - if platform.system() in {"Darwin", "Linux"}: + if platform.system() in {"Darwin", "Linux", "Emscripten"}: shlib_pref = "lib" elif platform.system() == "Windows": shlib_pref = "" From c4566855d13ec4b9ae5d73129861316a0eced2c0 Mon Sep 17 00:00:00 2001 From: Maksim Levental Date: Sun, 22 Jun 2025 22:24:06 -0400 Subject: [PATCH 7/7] Update util.py --- mlir/extras/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/extras/util.py b/mlir/extras/util.py index 2eceade..ba8a72f 100644 --- a/mlir/extras/util.py +++ b/mlir/extras/util.py @@ -84,7 +84,7 @@ def enable_debug(): def shlib_ext(): if platform.system() == "Darwin": shlib_ext = "dylib" - elif platform.system() == {"Linux", "Emscripten"}: + elif platform.system() in {"Linux", "Emscripten"}: shlib_ext = "so" elif platform.system() == "Windows": shlib_ext = "lib"