summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Aphecetche <laurent.aphecetche@gmail.com>2022-09-26 17:30:24 +0200
committerGitHub <noreply@github.com>2022-09-26 08:30:24 -0700
commit3aa93ca79d532a4f2f3729f5d296268855f1b4f2 (patch)
tree9af6de91d86254e11f66862a73c7ce84ed4dcbcf
parentb7926eb6c8ca699d2fcc6d63b755185c2c737323 (diff)
downloadspack-3aa93ca79d532a4f2f3729f5d296268855f1b4f2.tar.gz
spack-3aa93ca79d532a4f2f3729f5d296268855f1b4f2.tar.bz2
spack-3aa93ca79d532a4f2f3729f5d296268855f1b4f2.tar.xz
spack-3aa93ca79d532a4f2f3729f5d296268855f1b4f2.zip
arrow: add version 9 and more variants (#32701)
* utf8proc: add version 2.7.0 and shared variant * xsimd: add version 8.1.0 * arrow: add version 9.0.0 and more variants
-rw-r--r--var/spack/repos/builtin/packages/arrow/package.py141
-rw-r--r--var/spack/repos/builtin/packages/utf8proc/package.py8
-rw-r--r--var/spack/repos/builtin/packages/xsimd/package.py1
3 files changed, 106 insertions, 44 deletions
diff --git a/var/spack/repos/builtin/packages/arrow/package.py b/var/spack/repos/builtin/packages/arrow/package.py
index 7870a7258a..c9bc1b7b66 100644
--- a/var/spack/repos/builtin/packages/arrow/package.py
+++ b/var/spack/repos/builtin/packages/arrow/package.py
@@ -2,8 +2,8 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
from spack.package import *
-from spack.pkg.builtin.boost import Boost
class Arrow(CMakePackage, CudaPackage):
@@ -15,6 +15,7 @@ class Arrow(CMakePackage, CudaPackage):
homepage = "https://arrow.apache.org"
url = "https://github.com/apache/arrow/archive/apache-arrow-0.9.0.tar.gz"
+ version("9.0.0", sha256="bb187b4b0af8dcc027fffed3700a7b891c9f76c9b63ad8925b4afb8257a2bb1b")
version("8.0.0", sha256="19ece12de48e51ce4287d2dee00dc358fbc5ff02f41629d16076f77b8579e272")
version("7.0.0", sha256="57e13c62f27b710e1de54fd30faed612aefa22aa41fa2c0c3bacd204dd18a8f3")
version("4.0.1", sha256="79d3e807df4a179cfab1e7a1ab5f79d95f7b72ac2c33aba030febd125d77eb3b")
@@ -28,32 +29,67 @@ class Arrow(CMakePackage, CudaPackage):
version("0.9.0", sha256="65f89a3910b6df02ac71e4d4283db9b02c5b3f1e627346c7b6a5982ae994af91")
version("0.8.0", sha256="c61a60c298c30546fc0b418a35be66ef330fb81b06c49928acca7f1a34671d54")
- depends_on("boost@1.60:")
-
- # TODO: replace this with an explicit list of components of Boost,
- # for instance depends_on('boost +filesystem')
- # See https://github.com/spack/spack/pull/22303 for reference
- depends_on(Boost.with_default_variants)
+ depends_on("boost@1.60: +filesystem +system")
depends_on("cmake@3.2.0:", type="build")
- depends_on("flatbuffers build_type=Release") # only Release contains flatc
- depends_on("python", when="+python")
+ depends_on("flatbuffers")
+ depends_on("llvm@:11 +clang", when="+gandiva @:3", type="build")
+ depends_on("llvm@:12 +clang", when="+gandiva @:4", type="build")
+ depends_on("llvm@:13 +clang", when="+gandiva @:7", type="build")
+ depends_on("llvm@:14 +clang", when="+gandiva @8:", type="build")
+ depends_on("lz4", when="+lz4")
+ depends_on("ninja", type="build")
+ depends_on("openssl", when="+gandiva @6.0.0:")
+ depends_on("openssl", when="@4.0.0:")
+ depends_on("orc", when="+orc")
+ depends_on("protobuf", when="+gandiva")
depends_on("py-numpy", when="+python")
+ depends_on("python", when="+python")
depends_on("rapidjson")
- depends_on("snappy~shared")
- depends_on("zlib+pic")
- depends_on("zstd")
+ depends_on("re2+shared", when="+compute")
+ depends_on("re2+shared", when="+gandiva")
+ depends_on("snappy~shared", when="+snappy @9:")
+ depends_on("snappy~shared", when="@8:")
depends_on("thrift+pic", when="+parquet")
- depends_on("orc", when="+orc")
-
+ depends_on("utf8proc@2.7.0: +shared", when="+compute")
+ depends_on("utf8proc@2.7.0: +shared", when="+gandiva")
+ depends_on("xsimd@8.1.0:", when="@9.0.0:")
+ depends_on("zlib+pic", when="+zlib @9:")
+ depends_on("zlib+pic", when="@:8")
+ depends_on("zstd", when="+zstd @9:")
+ depends_on("zstd", when="@:8")
+
+ variant("brotli", default=False, description="Build support for Brotli compression")
variant(
"build_type",
default="Release",
description="CMake build type",
values=("Debug", "FastDebug", "Release"),
)
- variant("python", default=False, description="Build Python interface")
+ variant(
+ "compute", default=False, description="Computational kernel functions and other support"
+ )
+ variant("gandiva", default=False, description="Build Gandiva support")
+ variant(
+ "glog",
+ default=False,
+ description="Build libraries with glog support for pluggable logging",
+ )
+ variant(
+ "hdfs",
+ default=False,
+ description="Integration with libhdfs for accessing the Hadoop Filesystem",
+ )
+ variant("ipc", default=True, description="Build the Arrow IPC extensions")
+ variant("jemalloc", default=False, description="Build the Arrow jemalloc-based allocator")
+ variant("lz4", default=False, description="Build support for lz4 compression")
+ variant("orc", default=False, description="Build integration with Apache ORC")
variant("parquet", default=False, description="Build Parquet interface")
- variant("orc", default=False, description="Build ORC support")
+ variant("python", default=False, description="Build Python interface")
+ variant("shared", default=True, description="Build shared libs")
+ variant("snappy", default=False, description="Build support for Snappy compression")
+ variant("tensorflow", default=False, description="Build Arrow with TensorFlow support enabled")
+ variant("zlib", default=False, description="Build support for zlib (gzip) compression")
+ variant("zstd", default=False, description="Build support for ZSTD compression")
root_cmakelists_dir = "cpp"
@@ -63,37 +99,54 @@ class Arrow(CMakePackage, CudaPackage):
r"(include_directories\()SYSTEM ", r"\1", "cpp/cmake_modules/ThirdpartyToolchain.cmake"
)
- def cmake_args(self):
- args = [
- "-DARROW_USE_SSE=ON",
- "-DARROW_BUILD_SHARED=ON",
- "-DARROW_BUILD_STATIC=OFF",
- "-DARROW_BUILD_TESTS=OFF",
- "-DARROW_WITH_BROTLI=OFF",
- "-DARROW_WITH_LZ4=OFF",
- ]
-
- if self.spec.satisfies("+cuda"):
- args.append("-DARROW_CUDA:BOOL=ON")
- else:
- args.append("-DARROW_CUDA:BOOL=OFF")
+ filter_file(
+ r'set\(ARROW_LLVM_VERSIONS "10" "9" "8" "7"\)',
+ 'set(ARROW_LLVM_VERSIONS "11" "10" "9" "8" "7")',
+ "cpp/CMakeLists.txt",
+ when="@:2.0.0",
+ )
- if self.spec.satisfies("+python"):
- args.append("-DARROW_PYTHON:BOOL=ON")
- else:
- args.append("-DARROW_PYTHON:BOOL=OFF")
+ filter_file(
+ r"#include <llvm/Support/DynamicLibrary\.h>",
+ r"#include <llvm/Support/DynamicLibrary.h>" + "\n" + r"#include <llvm/Support/Host.h>",
+ "cpp/src/gandiva/engine.cc",
+ when="@2.0.0",
+ )
- if self.spec.satisfies("+parquet"):
- args.append("-DARROW_PARQUET:BOOL=ON")
- else:
- args.append("-DARROW_PARQUET:BOOL=OFF")
+ def cmake_args(self):
+ args = ["-DARROW_DEPENDENCY_SOURCE=SYSTEM", "-DARROW_NO_DEPRECATED_API=ON"]
- if self.spec.satisfies("+orc"):
- args.append("-DARROW_ORC:BOOL=ON")
+ if self.spec.satisfies("+shared"):
+ args.append(self.define("BUILD_SHARED", "ON"))
else:
- args.append("-DARROW_ORC:BOOL=OFF")
+ args.append(self.define("BUILD_SHARED", "OFF"))
+ args.append(self.define("BUILD_STATIC", "ON"))
+
+ if self.spec.satisfies("@:0.11.99"):
+ # ARROW_USE_SSE was removed in 0.12
+ # see https://issues.apache.org/jira/browse/ARROW-3844
+ args.append(self.define("ARROW_USE_SSE", "ON"))
+
+ args.append(self.define_from_variant("ARROW_COMPUTE", "compute"))
+ args.append(self.define_from_variant("ARROW_CUDA", "cuda"))
+ args.append(self.define_from_variant("ARROW_GANDIVA", "gandiva"))
+ args.append(self.define_from_variant("ARROW_GLOG", "glog"))
+ args.append(self.define_from_variant("ARROW_HDFS", "hdfs"))
+ args.append(self.define_from_variant("ARROW_IPC", "ipc"))
+ args.append(self.define_from_variant("ARROW_JEMALLOC", "jemalloc"))
+ args.append(self.define_from_variant("ARROW_ORC", "orc"))
+ args.append(self.define_from_variant("ARROW_PARQUET", "parquet"))
+ args.append(self.define_from_variant("ARROW_PYTHON", "python"))
+ args.append(self.define_from_variant("ARROW_TENSORFLOW", "tensorflow"))
+ args.append(self.define_from_variant("ARROW_WITH_BROTLI", "brotli"))
+ args.append(self.define_from_variant("ARROW_WITH_LZ4", "lz4"))
+ args.append(self.define_from_variant("ARROW_WITH_SNAPPY", "snappy"))
+ args.append(self.define_from_variant("ARROW_WITH_ZLIB", "zlib"))
+ args.append(self.define_from_variant("ARROW_WITH_ZSTD", "zstd"))
+
+ with when("@:8"):
+ for dep in ("flatbuffers", "rapidjson", "snappy", "zlib", "zstd"):
+ args.append("-D{0}_HOME={1}".format(dep.upper(), self.spec[dep].prefix))
+ args.append("-DZLIB_LIBRARIES={0}".format(self.spec["zlib"].libs))
- for dep in ("flatbuffers", "rapidjson", "snappy", "zlib", "zstd"):
- args.append("-D{0}_HOME={1}".format(dep.upper(), self.spec[dep].prefix))
- args.append("-DZLIB_LIBRARIES={0}".format(self.spec["zlib"].libs))
return args
diff --git a/var/spack/repos/builtin/packages/utf8proc/package.py b/var/spack/repos/builtin/packages/utf8proc/package.py
index 24357dffb1..ae812893b6 100644
--- a/var/spack/repos/builtin/packages/utf8proc/package.py
+++ b/var/spack/repos/builtin/packages/utf8proc/package.py
@@ -13,9 +13,17 @@ class Utf8proc(CMakePackage):
homepage = "https://juliastrings.github.io/utf8proc/"
url = "https://github.com/JuliaStrings/utf8proc/archive/v2.4.0.tar.gz"
+ version("2.7.0", sha256="4bb121e297293c0fd55f08f83afab6d35d48f0af4ecc07523ad8ec99aa2b12a1")
version("2.6.1", sha256="4c06a9dc4017e8a2438ef80ee371d45868bda2237a98b26554de7a95406b283b")
version("2.6.0", sha256="b36ce1534b8035e7febd95c031215ed279ee9d31cf9b464e28b4c688133b22c5")
version("2.5.0", sha256="d4e8dfc898cfd062493cb7f42d95d70ccdd3a4cd4d90bec0c71b47cca688f1be")
version("2.4.0", sha256="b2e5d547c1d94762a6d03a7e05cea46092aab68636460ff8648f1295e2cdfbd7")
+ variant("shared", default=False, description="Build a shared version of the library")
+
+ def cmake_args(self):
+ args = []
+ args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
+ return args
+
depends_on("cmake@2.8.12:", type="build")
diff --git a/var/spack/repos/builtin/packages/xsimd/package.py b/var/spack/repos/builtin/packages/xsimd/package.py
index 065e49884a..a016cca043 100644
--- a/var/spack/repos/builtin/packages/xsimd/package.py
+++ b/var/spack/repos/builtin/packages/xsimd/package.py
@@ -16,6 +16,7 @@ class Xsimd(CMakePackage):
maintainers = ["ax3l"]
version("develop", branch="master")
+ version("8.1.0", sha256="d52551360d37709675237d2a0418e28f70995b5b7cdad7c674626bcfbbf48328")
version("8.0.5", sha256="0e1b5d973b63009f06a3885931a37452580dbc8d7ca8ad40d4b8c80d2a0f84d7")
version("8.0.4", sha256="5197529e7ca715ddfcae7c5c4097879c86dae6ef85f3f67c402e2e6c5e803c41")
version("8.0.3", sha256="d1d41253c4f82eaf2f369d7fcb4142e35076cf8675b9d94caa06ecf883024344")