Skip to content

Commit

Permalink
Start utilising pkgconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
JDBetteridge committed Nov 9, 2024
1 parent 2c1bfc0 commit 4839c0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ requires = [
"setuptools>61.2",
"Cython>=3.0",
"pybind11",
"pkgconfig",
"numpy>=2.0",
"mpi4py",
"petsc4py",
Expand Down
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import petsc4py
import rtree
import supermesh
import pkgconfig

# Define the compilers to use if not already set
if "CC" not in os.environ:
Expand Down Expand Up @@ -114,7 +115,10 @@ def __getitem__(self, key):
include_dirs = [str(hdf5_dir.joinpath("include"))],
library_dirs = [str(hdf5_dir.joinpath("lib"))]
)
elif pkgconfig.exists("hdf5"):
hdf5_ = ExternalDependency(**pkgconfig.parse("hdf5"))
else:
# Set the library name and hope for the best
hdf5_ = ExternalDependency(libraries=["hdf5"])

# Note:
Expand Down

0 comments on commit 4839c0a

Please sign in to comment.