Skip to content

Commit

Permalink
update pyo3 version
Browse files Browse the repository at this point in the history
  • Loading branch information
nmammeri committed Dec 20, 2024
1 parent 263ee36 commit 4685f0a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/release_python.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file was autogenerated by maturin v1.6.0 using:
# maturin generate-ci github -o ../../.github/workflows/release_pyton_pytest.yml --pytest
#
#
# Then adapted to the project
#
name: CI
Expand All @@ -10,7 +10,7 @@ on:
branches:
- main
tags:
- '*'
- "*"
pull_request:
workflow_dispatch:

Expand All @@ -31,15 +31,15 @@ jobs:
target: x86_64
#- runner: self-hosted-arm64
# target: aarch64
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.8", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

# On linux we don't use graalvm/[email protected] action to install graalvm because it will install it
# on the runner machine and on linux the build will happen inside a manylinux docker.
# on the runner machine and on linux the build will happen inside a manylinux docker.
# Instead, we use a script to install graalvm inside the docker container
# the script is launched by setting the before-script-linux config option of the maturin action
- name: Build wheels
Expand All @@ -48,7 +48,7 @@ jobs:
command: build
#working-directory: "bindings/extractous-python" # dont use working dir with docker fails to reapply permission on target dir
args: --manifest-path bindings/extractous-python/Cargo.toml --release --out bindings/extractous-python/dist -i python${{ matrix.python-version }} --compatibility manylinux_2_28
sccache: 'false'
sccache: "false"
target: ${{ matrix.platform.target }}
container: quay.io/pypa/manylinux_2_28_${{ matrix.platform.target }}:latest
before-script-linux: .github/workflows/install-graalvm-sdkman.sh 23.0.1-graalce
Expand All @@ -62,7 +62,7 @@ jobs:
with:
name: wheels-linux-${{ matrix.platform.target }}
path: bindings/extractous-python/dist

- name: pytest
if: ${{ startsWith(matrix.platform.target, 'x86_64') }}
shell: bash
Expand Down Expand Up @@ -105,20 +105,20 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: "3.8"
architecture: ${{ matrix.platform.target }}
- uses: graalvm/[email protected]
with:
java-version: '23'
distribution: 'graalvm-community'
set-java-home: 'true'
java-version: "23"
distribution: "graalvm-community"
set-java-home: "true"
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
working-directory: "bindings/extractous-python"
args: --release --out dist --find-interpreter
sccache: 'true'
sccache: "true"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -147,25 +147,25 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: "3.8"

# - uses: graalvm/[email protected]
# with:
# java-version: '23'
# distribution: 'liberica'
# set-java-home: 'true'
# - name: Install graalvm
# run: |
# set -e
# bash .github/workflows/install-graalvm-sdkman-macos.sh 24.1.1.r23-nik
# - uses: graalvm/[email protected]
# with:
# java-version: '23'
# distribution: 'liberica'
# set-java-home: 'true'
# - name: Install graalvm
# run: |
# set -e
# bash .github/workflows/install-graalvm-sdkman-macos.sh 24.1.1.r23-nik

- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
working-directory: "bindings/extractous-python"
args: --release --out dist --find-interpreter
sccache: 'true'
sccache: "true"

- name: Patch wheel lib
run: |
Expand Down Expand Up @@ -207,7 +207,7 @@ jobs:
name: wheels-sdist
path: bindings/extractous-python/dist

# Follows the guide on https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
# Follows the guide on https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
# We use 2 actions one to publish on PyPi on tag pushes to main brnach and the other to publish on TestPyPi on any push
publish-to-testpypi:
name: Publish to TestPyPI
Expand All @@ -219,7 +219,7 @@ jobs:
url: https://pypi.org/p/extractous
permissions:
contents: read
id-token: write # IMPORTANT: mandatory for trusted publishing
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v4
with:
Expand All @@ -243,7 +243,7 @@ jobs:
name: pypi
url: https://pypi.org/p/extractous
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion bindings/extractous-python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ doc = false

[dependencies]
# "abi3-py310" tells pyo3 (and maturin) to build using the stable ABI with minimum Python version 3.10
pyo3 = { version = "0.22.6", features = ["abi3", "abi3-py38", "gil-refs"] }
pyo3 = { version = "0.23.3", features = ["abi3", "abi3-py38"] }
extractous = { path = "../../extractous-core" }

0 comments on commit 4685f0a

Please sign in to comment.