Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python interface build and run without petsc4py #3182

Merged
merged 19 commits into from
Apr 26, 2024

Conversation

garth-wells
Copy link
Member

@garth-wells garth-wells commented Apr 26, 2024

This allows the Python interface to be built without petcc4py.

pyproject.toml doesn't handle optional build requirements, so comments have been added to explain why petsc4py isn't listed as build dependency.

As it stands, if the C++ interface is built with PETSc and petsc4py is found then petsc4py is enabled in the Python interface build. Otherwise petsc4py is not enabled in the build.

Resolves #2472

@garth-wells garth-wells requested a review from jhale April 26, 2024 13:57
@@ -36,6 +36,7 @@ dependencies = [
docs = ["markdown", "pyyaml", "sphinx", "sphinx_rtd_theme"]
lint = ["ruff"]
optional = ["numba"]
petsc4py = ["petsc4py"]
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could just call this petsc = ["petsc4py"] for short?

Copy link
Member Author

@garth-wells garth-wells Apr 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

petsc and petsc4py are different things.

.github/workflows/ccpp.yml Outdated Show resolved Hide resolved
python/CMakeLists.txt Show resolved Hide resolved
@garth-wells garth-wells added this pull request to the merge queue Apr 26, 2024
Merged via the queue into main with commit a3a6b6a Apr 26, 2024
23 checks passed
@garth-wells garth-wells deleted the garth/no-petsc4py branch April 26, 2024 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make PETSc an optional dependency
3 participants