Skip to content
10 changes: 8 additions & 2 deletions .github/actions/install_petsc4py/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -46,9 +46,15 @@ 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
run: |
pip install wheel Cython numpy
pip install wheel numpy
pip install src/binding/petsc4py
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ All notable changes to this project will be documented in this file.

### Changed

- #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
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions petsc4py.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@@ -1,6 +1,6 @@
[build-system]
requires = [
- "cython >= 3",
+ "cython >= 3, < 3.3",
"numpy",
"setuptools",
]