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 808b24d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
8 changes: 5 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
- 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
- backend: dolfinx-real
container: dolfinx/dolfinx:nightly
setup_container: |
Expand Down Expand Up @@ -70,12 +72,12 @@ jobs:
run: ${{ matrix.setup_container }}
- name: Install RBniCSx
run: |
python3 -m pip install scikit-build-core[pyproject]
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 808b24d

Please sign in to comment.