Skip to content

Commit

Permalink
Change build backend to scikit_build_core in pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-ballarin committed Nov 1, 2023
1 parent 25fa79b commit 5078375
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@ jobs:
echo "OMPI_ALLOW_RUN_AS_ROOT=1" >> $GITHUB_ENV
echo "OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1" >> $GITHUB_ENV
rm /usr/local/lib/python3.11/site-packages/petsc4py/py.typed
python3 -m pip install pybind11 scikit-build-core[pyproject]
- backend: none-complex
container: numericalpdes/base_images:slepc4py-complex
setup_container: |
echo "OMPI_ALLOW_RUN_AS_ROOT=1" >> $GITHUB_ENV
echo "OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1" >> $GITHUB_ENV
rm /usr/local/lib/python3.11/site-packages/petsc4py/py.typed
python3 -m pip install pybind11 scikit-build-core[pyproject]
- backend: dolfinx-real
container: dolfinx/dolfinx:nightly
setup_container: |
Expand All @@ -51,6 +53,7 @@ jobs:
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
rm /usr/local/lib/python3.10/dist-packages/petsc4py/py.typed
python3 -m pip install scikit-build-core[pyproject]
- backend: dolfinx-complex
container: dolfinx/dolfinx:nightly
setup_container: |
Expand All @@ -60,6 +63,7 @@ jobs:
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
rm /usr/local/lib/python3.10/dist-packages/petsc4py/py.typed
python3 -m pip install scikit-build-core[pyproject]
fail-fast: false
container:
image: ${{ matrix.container }}
Expand All @@ -71,11 +75,10 @@ jobs:
- name: Install RBniCSx
run: |
if [[ "${{ matrix.backend }}" == none* ]]; then
python3 -m pip install .[docs,lint,tests]
python3 -m pip install --check-build-dependencies --no-build-isolation --verbose .[docs,lint,tests]
else
python3 -m pip install .[docs,lint,tests,tutorials]
python3 -m pip install --check-build-dependencies --no-build-isolation --verbose .[docs,lint,tests,tutorials]
fi
python3 -c "import rbnicsx._cpp"
shell: bash
- name: Update mypy configuration
if: startsWith(matrix.backend, 'none') == true
Expand Down
17 changes: 10 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
[build-system]
requires = ["setuptools>=62", "wheel"]
build-backend = "setuptools.build_meta"
requires = [
"petsc4py",
"pybind11 >= 2.9.1",
"scikit-build-core[pyproject]"
]
build-backend = "scikit_build_core.build"

[project]
name = "RBniCSx"
Expand Down Expand Up @@ -159,8 +163,7 @@ ignore_missing_imports = true
module = "ufl"
ignore_missing_imports = true

[tool.setuptools.package-data]
viskex = ["py.typed"]

[tool.setuptools.packages.find]
namespaces = false
[tool.scikit-build]
cmake.source-dir = "rbnicsx/_cpp"
wheel.packages = ["rbnicsx"]
sdist.exclude = ["*.cpp", "*.h", "CMakeLists.txt"]

0 comments on commit 5078375

Please sign in to comment.