From 52ea45dc54634632e859af453a20fec74e42f7d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaman=20G=C3=BC=C3=A7l=C3=BC?= Date: Wed, 26 Aug 2026 17:09:46 +0200 Subject: [PATCH 01/10] Use PETSc version 3.25.4 in GitHub Actions --- .github/actions/install_petsc4py/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install_petsc4py/action.yml b/.github/actions/install_petsc4py/action.yml index 7cc21c01e..b31bc14b0 100644 --- a/.github/actions/install_petsc4py/action.yml +++ b/.github/actions/install_petsc4py/action.yml @@ -18,7 +18,7 @@ runs: name: Download a specific release of PETSc shell: bash run: | - git clone --depth 1 --branch v3.25.0 https://gitlab.com/petsc/petsc.git + git clone --depth 1 --branch v3.25.4 https://gitlab.com/petsc/petsc.git # The branch "release" contains work towards the next version of PETSc, # and it may not be stable. If necessary, it can be cloned as follows: # git clone --depth 1 --branch release https://gitlab.com/petsc/petsc.git From d0dc50e71c5ccf73833514bc1ec980cd886a1a8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaman=20G=C3=BC=C3=A7l=C3=BC?= Date: Wed, 26 Aug 2026 17:18:39 +0200 Subject: [PATCH 02/10] Update PETSc version in installation guide --- docs/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation.md b/docs/installation.md index 0dd7576e1..eea8168b2 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -162,7 +162,7 @@ Although PSYDAC provides several iterative linear solvers which work with our na In order to use these additional feature, PETSc and petsc4py must be installed as follows. First, we download the latest release of PETSc from its [official Git repository](https://gitlab.com/petsc/petsc): ```sh -git clone --depth 1 --branch v3.25.0 https://gitlab.com/petsc/petsc.git +git clone --depth 1 --branch v3.25.4 https://gitlab.com/petsc/petsc.git ``` Next, we specify a configuration for complex numbers, and install PETSc in a local directory: ```sh From 063a01a63512be93678d470f2c642cdafbd8ef2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaman=20G=C3=BC=C3=A7l=C3=BC?= Date: Wed, 26 Aug 2026 17:21:35 +0200 Subject: [PATCH 03/10] Update changelog with PETSc and dependency changes --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3546db8cc..759f0768a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ All notable changes to this project will be documented in this file. ### Changed +- #593 : Use PETSc 3.25.4 whose Python bindings `petsc4py` install correctly with `cython>=3.3.0` - #580 : Use PETSc 3.25.0 whose Python bindings `petsc4py` install correctly with `setuptools>=81.0` - #579 : Require `pyccel>=2.2.3` which can compile all kernels with C - #579 : Require `numpy>=2.1` to support Python >= 3.10 From c2a6924d0cc966fdf3846a2cb659498f893a5653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaman=20G=C3=BC=C3=A7l=C3=BC?= Date: Wed, 26 Aug 2026 18:39:00 +0200 Subject: [PATCH 04/10] Patch petsc4py build requirements: Cython >= 3, < 3.3 --- .github/actions/install_petsc4py/action.yml | 6 ++++++ petsc4py.patch | 8 ++++++++ 2 files changed, 14 insertions(+) create mode 100644 petsc4py.patch diff --git a/.github/actions/install_petsc4py/action.yml b/.github/actions/install_petsc4py/action.yml index b31bc14b0..9b44c76c1 100644 --- a/.github/actions/install_petsc4py/action.yml +++ b/.github/actions/install_petsc4py/action.yml @@ -46,6 +46,12 @@ runs: echo "PETSC_DIR=$PETSC_DIR" >> $GITHUB_ENV echo "PETSC_ARCH=$PETSC_ARCH" >> $GITHUB_ENV + # Use Cython >= 3, < 3.3 + - name: Patch petsc4py build requirements + shell: bash + run: | + patch petsc/src/binding/petsc4py/pyproject.toml petsc4py.patch + - name: Install petsc4py shell: bash working-directory: ./petsc diff --git a/petsc4py.patch b/petsc4py.patch new file mode 100644 index 000000000..bc99b3554 --- /dev/null +++ b/petsc4py.patch @@ -0,0 +1,8 @@ +@@ -1,6 +1,6 @@ + [build-system] + requires = [ +- "cython >= 3", ++ "cython >= 3, < 3.3", + "numpy", + "setuptools", + ] From 0459499f516193bc5aa4c3e8ab14a835aca508f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaman=20G=C3=BC=C3=A7l=C3=BC?= Date: Wed, 26 Aug 2026 18:49:53 +0200 Subject: [PATCH 05/10] Update CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 759f0768a..41ee9bc29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ All notable changes to this project will be documented in this file. ### Changed -- #593 : Use PETSc 3.25.4 whose Python bindings `petsc4py` install correctly with `cython>=3.3.0` +- #593 : Use PETSc 3.25.4 with patch on Python bindings `petsc4py` to build with `cython>=3,<3.3` - #580 : Use PETSc 3.25.0 whose Python bindings `petsc4py` install correctly with `setuptools>=81.0` - #579 : Require `pyccel>=2.2.3` which can compile all kernels with C - #579 : Require `numpy>=2.1` to support Python >= 3.10 From df52c317819eb5da50ad83c7be743f5f58dd9d15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaman=20G=C3=BC=C3=A7l=C3=BC?= Date: Wed, 26 Aug 2026 19:00:17 +0200 Subject: [PATCH 06/10] Do not install cython before petsc4py Removed Cython from the petsc4py installation command. --- .github/actions/install_petsc4py/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install_petsc4py/action.yml b/.github/actions/install_petsc4py/action.yml index 9b44c76c1..5c88f45fa 100644 --- a/.github/actions/install_petsc4py/action.yml +++ b/.github/actions/install_petsc4py/action.yml @@ -56,5 +56,5 @@ runs: shell: bash working-directory: ./petsc run: | - pip install wheel Cython numpy + pip install wheel numpy pip install src/binding/petsc4py From dbf06ebf19548f4b9c4d1f14b091c3a3662b37d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaman=20G=C3=BC=C3=A7l=C3=BC?= Date: Thu, 27 Aug 2026 12:20:04 +0200 Subject: [PATCH 07/10] Use `checkout@v6` & `setup-python@v6` in `testing` workflow --- .github/workflows/testing.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index f482ff643..1b4c2ff7b 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -40,10 +40,12 @@ jobs: OMP_NUM_THREADS: 2 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 + with: + submodules: true - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} cache: 'pip' From 48678f3dbb988716e35537ace61ee7e931955059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaman=20G=C3=BC=C3=A7l=C3=BC?= Date: Thu, 27 Aug 2026 12:22:42 +0200 Subject: [PATCH 08/10] Use `checkout@v6` & `setup-python@v6` in `documentation` workflow --- .github/workflows/documentation.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index c708fb6f6..1ef1d8a96 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -28,12 +28,15 @@ jobs: OMP_NUM_THREADS: 2 steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 + with: + submodules: true - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: '3.10' + - name: Install non-Python dependencies on Ubuntu uses: awalsh128/cache-apt-pkgs-action@latest with: From 8813337b3f4d043357fd58688fe4bf7ddc7e7e2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaman=20G=C3=BC=C3=A7l=C3=BC?= Date: Thu, 27 Aug 2026 12:24:01 +0200 Subject: [PATCH 09/10] Use `checkout@v6` & `setup-python@v6` in `deploy_check` workflow --- .github/workflows/deploy_check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy_check.yml b/.github/workflows/deploy_check.yml index 9be91e987..49675c061 100644 --- a/.github/workflows/deploy_check.yml +++ b/.github/workflows/deploy_check.yml @@ -21,13 +21,13 @@ jobs: paths: '["psydac/**", "pyproject.toml", ".github/workflows/deploy_check.yml", ".github/actions/**"]' - name: Set up Python 3.12 - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: '3.12' - name: Checkout repository if: steps.duplicate_check.outputs.should_skip != 'true' - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: submodules: true From 866e8c5adc2444209178089fae64e91c7a5473da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaman=20G=C3=BC=C3=A7l=C3=BC?= Date: Thu, 27 Aug 2026 12:24:58 +0200 Subject: [PATCH 10/10] Use `setup-python@v6` in `deploy` workflow --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7929ddf04..6179f24ec 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,7 +13,7 @@ jobs: if: ${{ github.repository == 'pyccel/psydac' && github.event.workflow_run.conclusion == 'success' }} steps: - name: Set up Python 3.12 - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: '3.12'