diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ab3f274..9fd63ec 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: @@ -94,13 +94,15 @@ jobs: - name: Build wheel shell: bash run: | - - pip install mlir-python-bindings==$BINDINGS_VERSION -t tmp - cp -R tmp/mlir $PWD + + if [ "$BUNDLE_MLIR_PYTHON_BINDINGS" == "1" ]; then + pip install mlir-python-bindings==$BINDINGS_VERSION -t tmp + cp -R tmp/mlir $PWD + fi 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: | diff --git a/mlir/extras/util.py b/mlir/extras/util.py index 06dc2c0..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": + elif platform.system() in {"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 = ""