summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2024-11-16 09:43:54 +0100
committerGitHub <noreply@github.com>2024-11-16 09:43:54 +0100
commit26d80e7bc5475634fbb4bfd89431f962d2c62be4 (patch)
treeebf629d065164e00180aecf73c5ca5b510773039 /var
parent60eb0e9c8080178c9b0ae093f76213137fc92db9 (diff)
downloadspack-26d80e7bc5475634fbb4bfd89431f962d2c62be4.tar.gz
spack-26d80e7bc5475634fbb4bfd89431f962d2c62be4.tar.bz2
spack-26d80e7bc5475634fbb4bfd89431f962d2c62be4.tar.xz
spack-26d80e7bc5475634fbb4bfd89431f962d2c62be4.zip
py-blosc2: use external libblosc2 (#47566)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-blosc2/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-tables/package.py7
2 files changed, 24 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/py-blosc2/package.py b/var/spack/repos/builtin/packages/py-blosc2/package.py
index 30964085df..d852742cc4 100644
--- a/var/spack/repos/builtin/packages/py-blosc2/package.py
+++ b/var/spack/repos/builtin/packages/py-blosc2/package.py
@@ -3,6 +3,9 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import shlex
+
+from spack.build_systems.cmake import CMakeBuilder
from spack.package import *
@@ -18,16 +21,26 @@ class PyBlosc2(PythonPackage):
version("2.2.8", sha256="59065aac5e9b01b0e9f3825d8e7f69f64b59bbfab148a47c54e4115f62a97474")
version("2.0.0", sha256="f19b0b3674f6c825b490f00d8264b0c540c2cdc11ec7e81178d38b83c57790a1")
- depends_on("c", type="build") # generated
+ depends_on("c", type="build")
depends_on("python@3.9:3", when="@2.2:", type=("build", "link", "run"))
depends_on("python@3.8:3", when="@2.0", type=("build", "link", "run"))
- depends_on("py-setuptools", type="build")
- depends_on("py-scikit-build", type="build")
- depends_on("py-cython", type="build")
- depends_on("cmake@3.11:", type="build")
- depends_on("ninja", type="build")
depends_on("py-numpy@1.20.3:", type=("build", "link", "run"))
depends_on("py-ndindex@1.4:", when="@2.2:", type=("build", "run"))
depends_on("py-msgpack", type=("build", "run"))
depends_on("py-py-cpuinfo", when="@2.2:", type=("build", "run"))
+ depends_on("c-blosc2", type="link")
+
+ with default_args(type="build"):
+ depends_on("py-setuptools")
+ depends_on("py-scikit-build")
+ depends_on("py-cython")
+ depends_on("cmake@3.11:")
+ depends_on("ninja")
+ depends_on("pkgconfig")
+
+ def setup_build_environment(self, env):
+ cmake_args = [*CMakeBuilder.std_args(self), CMakeBuilder.define("USE_SYSTEM_BLOSC2", True)]
+ # scikit-build does not want a CMAKE_INSTALL_PREFIX
+ cmake_args = [arg for arg in cmake_args if "CMAKE_INSTALL_PREFIX" not in arg]
+ env.set("SKBUILD_CONFIGURE_OPTIONS", " ".join(shlex.quote(arg) for arg in cmake_args))
diff --git a/var/spack/repos/builtin/packages/py-tables/package.py b/var/spack/repos/builtin/packages/py-tables/package.py
index e2242acf8c..54aa7771fb 100644
--- a/var/spack/repos/builtin/packages/py-tables/package.py
+++ b/var/spack/repos/builtin/packages/py-tables/package.py
@@ -31,8 +31,8 @@ class PyTables(PythonPackage):
depends_on("cxx", type="build") # generated
variant("zlib", default=True, description="Support for zlib compression")
- variant("bzip2", default=False, description="Support for bzip2 compression")
- variant("lzo", default=False, description="Support for lzo compression")
+ variant("bzip2", default=True, description="Support for bzip2 compression")
+ variant("lzo", default=True, description="Support for lzo compression")
# pyproject.toml
depends_on("py-setuptools@61:", when="@3.9:", type="build")
@@ -65,6 +65,9 @@ class PyTables(PythonPackage):
depends_on("c-blosc@1.11.1:", when="@3.8:")
depends_on("c-blosc@1.4.1:", when="@3.3:")
+ # blosc2 headers are directly included
+ depends_on("c-blosc2")
+
depends_on("zlib-api", when="+zlib")
depends_on("bzip2", when="+bzip2")
depends_on("lzo", when="+lzo")