diff --git a/.github/workflows/release_python.yml b/.github/workflows/release_python.yml index 2d98647fdfe2..4725e223e246 100644 --- a/.github/workflows/release_python.yml +++ b/.github/workflows/release_python.yml @@ -68,31 +68,33 @@ jobs: - uses: actions/checkout@v4 - name: Setup Rust toolchain uses: ./.github/actions/setup - - uses: PyO3/maturin-action@v1 + + # actions/setup-python@v5 doesn't support this yet + - uses: Quansight-Labs/setup-python@v5.3.1 + if: ${{ runner.os == 'Windows' }} with: - working-directory: "bindings/python" - target: "${{ matrix.target }}" - command: build - args: --release -o dist -i python3.11 --features=pyo3/extension-module,services-all,abi3 - sccache: true - manylinux: auto + python-version: "3.13t" + - uses: PyO3/maturin-action@v1 + name: build abi3-cp311 wheels with: working-directory: "bindings/python" target: "${{ matrix.target }}" command: build - args: --release -o dist -i python3.10 --features=pyo3/extension-module,services-all + args: --release -o dist -i 3.11 --features=pyo3/extension-module,services-all,abi3 sccache: true manylinux: auto - - name: Build free-threaded wheels - uses: PyO3/maturin-action@v1 + + - uses: PyO3/maturin-action@v1 + name: build wheels for cp310 and cp313t with: working-directory: "bindings/python" target: "${{ matrix.target }}" command: build - args: --release -o dist -i python3.13t --features=pyo3/extension-module,services-all + args: --release -o dist -i 3.10 -i 3.13t --features=pyo3/extension-module,services-all sccache: true manylinux: auto + - name: Upload wheels uses: actions/upload-artifact@v3 with: diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index a2db6361c85d..87f6df2b8e37 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -150,7 +150,7 @@ services-upyun = ["opendal/services-upyun"] services-vercel-artifacts = ["opendal/services-vercel-artifacts"] services-yandex-disk = ["opendal/services-yandex-disk"] # we build cp311-abi3 and cp310 wheels now, move this to pyo3 after we drop cp310 -abi3 = ["pyo3/abi3-py311"] +abi3 = ["pyo3/abi3-py311", "pyo3/generate-import-lib"] [lib] crate-type = ["cdylib"] @@ -160,10 +160,8 @@ doc = false bytes = "1.5.0" futures = "0.3.28" # this crate won't be published, we always use the local version -opendal = { version = ">=0", path = "../../core", features = [ - "layers-blocking", -] } -pyo3 = { version = "0.23.3", features = ["generate-import-lib"] } +opendal = { version = ">=0", path = "../../core", features = ["layers-blocking"] } +pyo3 = { version = "0.23.3", features = ["extension-module"] } pyo3-async-runtimes = { version = "0.23.0", features = ["tokio-runtime"] } tokio = "1"