diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9964b47..beb3bb0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: | @@ -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: | @@ -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 }} @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 06ffae1..48cd25a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" @@ -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"]