py-gfal2-python: new package to fix gfal2-util (#48165)

* py-gfal2-python: add new package
* gfal2-util: depends_on py-gfal2-python
* py-gfal2-python: patch setup.py to find correct python
* py-gfal2-python: depends_on boost +python
This commit is contained in:
Wouter Deconinck 2024-12-18 15:44:09 -06:00 committed by GitHub
parent e7e5352e93
commit c50ac5ac25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 37 additions and 0 deletions

View File

@ -19,3 +19,4 @@ class Gfal2Util(PythonPackage):
version("1.9.0", sha256="9a5194b7ac80381c0787ec7c2405cc3e060fc03bb99e80bbeb388ec3675cb13d") version("1.9.0", sha256="9a5194b7ac80381c0787ec7c2405cc3e060fc03bb99e80bbeb388ec3675cb13d")
depends_on("py-setuptools", type="build") depends_on("py-setuptools", type="build")
depends_on("py-gfal2-python", type=("build", "run"))

View File

@ -0,0 +1,36 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyGfal2Python(PythonPackage):
"""Python2 and 3 bindings for gfal2."""
homepage = "https://github.com/cern-fts/gfal2-python"
pypi = "gfal2-python/gfal2-python-1.13.0.tar.gz"
maintainers("wdconinc")
license("Apache-2.0", checked_by="wdconinc")
version("1.13.0", sha256="5be42cc894fa20af3d6f6dbb30dfd4d29ab49bd5f15b3e3e754aa25c5ed17997")
depends_on("cxx", type="build")
depends_on("python", type="build")
depends_on("py-setuptools", type="build")
depends_on("cmake", type="build")
depends_on("boost +python")
depends_on("glib")
depends_on("gfal2")
def patch(self):
filter_file(
r"\'-DSKIP_TESTS=TRUE\',",
"'-DSKIP_TESTS=TRUE', f'-DPython_EXECUTABLE={sys.executable}',",
"setup.py",
)