Skip to content

Commit

Permalink
Used the built in python extension to set up pybind11 dependencies in
Browse files Browse the repository at this point in the history
the bufr-query python variant.
  • Loading branch information
srherbener committed Aug 19, 2024
1 parent a476583 commit f49994d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions var/spack/repos/builtin/packages/bufr-query/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from spack.package import *


class BufrQuery(CMakePackage):
class BufrQuery(CMakePackage, PythonExtension):
"""The NOAA bufr-query Library can be used to read NCEP and WMO formated BUFR
files using a simple interface that does not require the user to know the
details of the BUFR format. Detailed documentation for the BUFR Library can
Expand Down Expand Up @@ -34,8 +34,10 @@ class BufrQuery(CMakePackage):

# Optional dependencies
variant("python", default=True, description="Enable Python interface")
depends_on("python@3:", type=("build", "run"), when="+python")
depends_on("py-pybind11", type=("build"), when="+python")

with when("+python"):
extends("python")
depends_on("py-pybind11")

# CMake configuration
def cmake_args(self):
Expand Down

0 comments on commit f49994d

Please sign in to comment.