Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,14 @@ jobs:
python-version: "3.12"

- name: Install Python build dependencies
working-directory: python
run: |
pip -v install --upgrade -r python/build-requirements.txt
pip install scikit-build-core setuptools
python -m scikit_build_core.build requires | python -c "import sys, json; print(' '.join(json.load(sys.stdin)))" | xargs pip install

- name: Install FEniCS Python components
run: |
pip install --no-build-isolation git+https://github.com/${{ env.ufl_repository }}.git@${{ env.ufl_ref }}
pip install git+https://github.com/${{ env.ufl_repository }}.git@${{ env.ufl_ref }}
pip install --no-build-isolation git+https://github.com/${{ env.basix_repository }}.git@${{ env.basix_ref }}
pip install --no-build-isolation git+https://github.com/${{ env.ffcx_repository }}.git@${{ env.ffcx_ref }}

Expand Down Expand Up @@ -187,11 +189,14 @@ jobs:
run: cat .github/workflows/fenicsx-refs.env >> $GITHUB_ENV

- name: Install Python build dependencies
run: pip install -r python/build-requirements.txt
working-directory: python
run: |
pip install scikit-build-core
python -m scikit_build_core.build requires | python -c "import sys, json; print(' '.join(json.load(sys.stdin)))" | xargs pip install

- name: Install FEniCS Python components
run: |
pip install --no-build-isolation git+https://github.com/${{ env.ufl_repository }}.git@${{ env.ufl_ref }}
pip install git+https://github.com/${{ env.ufl_repository }}.git@${{ env.ufl_ref }}
pip install --no-build-isolation git+https://github.com/${{ env.basix_repository }}.git@${{ env.basix_ref }}
pip install --no-build-isolation git+https://github.com/${{ env.ffcx_repository }}.git@${{ env.ffcx_ref }}

Expand Down Expand Up @@ -292,10 +297,15 @@ jobs:
- name: Load environment variables
run: cat .github/workflows/fenicsx-refs.env >> $GITHUB_ENV

- name: Install Python build dependencies
working-directory: python
run: |
pip install scikit-build-core setuptools
python -m scikit_build_core.build requires | python -c "import sys, json; print(' '.join(json.load(sys.stdin)))" | xargs pip install

- name: Install FEniCS Python components
run: |
pip install -r python/build-requirements.txt
pip install --no-build-isolation git+https://github.com/${{ env.ufl_repository }}.git@${{ env.ufl_ref }}
pip install git+https://github.com/${{ env.ufl_repository }}.git@${{ env.ufl_ref }}
pip install --no-build-isolation git+https://github.com/${{ env.basix_repository }}.git@${{ env.basix_ref }}
pip install --no-build-isolation git+https://github.com/${{ env.ffcx_repository }}.git@${{ env.ffcx_ref }}

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ jobs:
run: |
apt-get update
apt-get install -y clang-tidy catch2
pip install -r python/build-requirements.txt

- name: Install Python build dependencies
working-directory: python
run: |
pip install scikit-build-core
python -m scikit_build_core.build requires | python -c "import sys, json; print(' '.join(json.load(sys.stdin)))" | xargs pip install

- name: Load environment variables
run: cat .github/workflows/fenicsx-refs.env >> $GITHUB_ENV
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,11 @@ jobs:
mpiexec -np 3 ctest -V --output-on-failure -R unittests

- name: Build and install DOLFINx Python interface
working-directory: python
run: |
pip install -r python/build-requirements.txt
pip install --check-build-dependencies --no-build-isolation 'python/[test]'
pip install scikit-build-core
python -m scikit_build_core.build requires | python -c "import sys, json; print(' '.join(json.load(sys.stdin)))" | xargs pip install
pip install --check-build-dependencies --no-build-isolation './[test]'

- name: Basic test
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ jobs:
- name: Install DOLFINx Python build dependencies
working-directory: dolfinx-src/python
run: |
pip -v install --no-binary mpi4py -r build-requirements.txt
pip install scikit-build-core
python -m pip install --no-binary mpi4py (python -m scikit_build_core.build requires | Out-String | ConvertFrom-Json)

- name: Install DOLFINx (Python)
working-directory: dolfinx-src/python
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ To install the Python interface, first install the C++ core, and then in
the `python/` directory run:

```shell
pip install -r build-requirements.txt
pip install scikit-build-core
python -m scikit_build_core.build requires | python -c "import sys, json; print(' '.join(json.load(sys.stdin)))" | xargs pip install
pip install --check-build-dependencies --no-build-isolation .
```

Expand Down
4 changes: 3 additions & 1 deletion docker/Dockerfile.end-user
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ ONBUILD ARG DOLFINX_CMAKE_BUILD_TYPE="Release"
# Using pip install `.[test]` with --no-dependencies and --no-build-isolation
# does not install necessary packages, hence install build and optional
# dependencies manually here.
ONBUILD RUN pip install --no-cache-dir -r dolfinx/python/build-requirements.txt && \
ONBUILD RUN cd dolfinx/python &&
pip install --no-cache-dir scikit-build-core &&
python -m scikit_build_core.build requires | python -c "import sys, json; print(' '.join(json.load(sys.stdin)))" | xargs pip install --no-cache-dir && \
pip install --no-cache-dir pyamg pytest scipy matplotlib numba # test + optional set

# The dolfinx-onbuild container expects to have folders basix/ ufl/
Expand Down
3 changes: 2 additions & 1 deletion python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Below is guidance for building the DOLFINx Python interface.

2. Ensure the Python interface build requirements are installed:

pip install -r build-requirements.txt
pip install scikit-build-core
python -m scikit_build_core.build requires | python -c "import sys, json; print(' '.join(json.load(sys.stdin)))" | xargs pip install

3. Build DOLFINx Python interface:

Expand Down
4 changes: 0 additions & 4 deletions python/build-requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion python/doc/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Python
After installation of the C++ interface, from the ``python/`` directory
the Python interface can be installed using::

pip install -r build-requirements.txt
python -m scikit_build_core.build requires | python -c "import sys, json; print(' '.join(json.load(sys.stdin)))" | xargs pip install
pip install --check-build-dependencies --no-build-isolation .


Expand Down
1 change: 0 additions & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# system built petsc4py and mpi4py.
# NOTE: petsc4py is an optional build dependency, therefore we don't
# list it here.
# pip install -r build-requirements.txt
[build-system]
requires = ["scikit-build-core[pyproject]>=0.10", "nanobind>=2.5.0", "mpi4py"]
build-backend = "scikit_build_core.build"
Expand Down
Loading