libseccomp: python forward compat bound (#47876)

* libseccomp: python forward compat bound

* include 2.5.5

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
This commit is contained in:
Harmen Stoppels 2024-12-02 22:59:40 +01:00 committed by GitHub
parent 30176582e4
commit ecb8a48376
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,7 +6,7 @@
from spack.package import *
class Libseccomp(AutotoolsPackage):
class Libseccomp(AutotoolsPackage, PythonExtension):
"""The main libseccomp repository"""
homepage = "https://github.com/seccomp/libseccomp"
@ -18,15 +18,17 @@ class Libseccomp(AutotoolsPackage):
version("2.5.3", sha256="59065c8733364725e9721ba48c3a99bbc52af921daf48df4b1e012fbc7b10a76")
version("2.3.3", sha256="7fc28f4294cc72e61c529bedf97e705c3acf9c479a8f1a3028d4cd2ca9f3b155")
depends_on("c", type="build") # generated
depends_on("c", type="build")
variant("python", default=True, description="Build Python bindings")
depends_on("gperf", type="build", when="@2.5:")
depends_on("py-cython", type="build", when="+python")
with when("+python"):
extends("python")
depends_on("py-cython", type="build")
# https://github.com/seccomp/libseccomp/commit/afbde6ddaec7c58c3b281d43b0b287269ffca9bd
depends_on("python@:3.11", type=("run", "link", "build"), when="@:2.5.5")
def configure_args(self):
args = []
if self.spec.satisfies("+python"):
args.append("--enable-python")
return args
return self.enable_or_disable("python", variant="python")